summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-12-10 08:56:18 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-12-10 09:06:16 (GMT)
commit0e04bd14bb422d7098f859a3b904fcf4d05aa458 (patch)
tree30df3d7e1419e47da6e1085da80e120d9f29e2a3 /src/corelib
parentd2a52072c7f0220d7abf0f73102cc5db616527b2 (diff)
downloadQt-0e04bd14bb422d7098f859a3b904fcf4d05aa458.zip
Qt-0e04bd14bb422d7098f859a3b904fcf4d05aa458.tar.gz
Qt-0e04bd14bb422d7098f859a3b904fcf4d05aa458.tar.bz2
Don't include <features.h> directly: non-standard header.
It's completely wrong to assume that any Linux has features.h. Instead, include something that comes from the libc (like stdlib.h, which is specified by ISO C 89) and hope that __GLIBC__ gets defined. Specifically don't do this to stddef.h as that one comes from the compiler. Reviewed-by: Andreas Kling
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qendian.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index d53504a..08415bf 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -44,9 +44,8 @@
#include <QtCore/qglobal.h>
-#ifdef Q_OS_LINUX
-# include <features.h>
-#endif
+// include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
+#include <stdlib.h>
#ifdef __GLIBC__
#include <byteswap.h>