scripts: kconfig: qconf.cc: fix a compiliation error when using make xconfig
PATCH 1/1 scripts: kconfig: qconf.cc: fix a compiliation error when using make xconfig
When using make xconfig, the following compilation error appears :
/usr/include/qt3/qvaluelist.h:427:13: error: ‘ptrdiff_t’ does not name a type
Including stddef.h in scripts/kconfig/qconf.cc permits to avoid this error.
--- scripts/kconfig/qconf.cc | 1 + 1 file changed, 1 insertion(+)
scripts/kconfig/qconf.cc +1 -0
@@ -6,6 +6,7 @@ #include <qglobal.h> #if QT_VERSION < 0x040000 +#include <stddef.h> #include <qmainwindow.h> #include <qvbox.h> #include <qvaluelist.h>
Signature · 1 line
1.7.10.4
Quoted 3 lines · Tiana Rakotovao Andriamahefa
When using make xconfig, the following compilation error appears :
/usr/include/qt3/qvaluelist.h:427:13: error: ‘ptrdiff_t’ does not name a type
Includingstddef.hinscripts/kconfig/qconf.ccpermits to avoid this error.
This is a bug in the Qt header. Is Qt3 still maintained?
Michal
Quoted 6 lines · Michal Marek
Quoted 3 lines · Tiana Rakotovao Andriamahefa
When using make xconfig, the following compilation error appears :
/usr/include/qt3/qvaluelist.h:427:13: error: ‘ptrdiff_t’ does not name a type
Includingstddef.hinscripts/kconfig/qconf.ccpermits to avoid this error.This is a bug in the Qt header. Is Qt3 still maintained?
This seems to be a common c++ issue since the begining of 2011.
Some Qt3 headers use ptrdiff_t which is defined in stddef.h. They also use some c++ headers, and rely on them to include stddef.h. However, since GCC-4.6, those c++ headers do not include stddef.h anymore. So, include <stddef.h> fixes it.
This issue is reported here: http://gcc.gnu.org/gcc-4.6/porting_to.html?
Signature · 1 line
Tiana Rakotovao Andriamahefa
Quoted 6 lines · Tiana Rakotovao Andriamahefa
Quoted 5 lines · Michal Marek
Quoted 3 lines · Tiana Rakotovao Andriamahefa
When using make xconfig, the following compilation error appears :
/usr/include/qt3/qvaluelist.h:427:13: error: ‘ptrdiff_t’ does not name a type
Includingstddef.hinscripts/kconfig/qconf.ccpermits to avoid this error.
Quoted 8 lines
Quoted 1 line
This is a bug in the Qt header. Is Qt3 still maintained?
This seems to be a common c++ issue since the begining of 2011.
Some Qt3 headers use
ptrdiff_twhich is defined instddef.h. They also use some c++ headers, and rely on them to includestddef.h. However, since GCC-4.6, those c++ headers do not includestddef.hanymore. So, include <stddef.h> fixes it.
Right. My question is - is Qt3 still maintained somehow, so the includes can be added where they belong, or do we need to workaround in in the applications?
Michal