summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qmessageauthenticationcode.cpp
diff options
context:
space:
mode:
authorRalf Nolden <nolden@kde.org>2016-05-22 13:31:27 +0200
committerRalf Nolden <nolden@kde.org>2016-05-23 09:51:18 +0000
commit14ae00dd50ed4a75c2efa0b34da971b0e252e124 (patch)
tree1eb60734a194b3eef22fee3647c00362c7be2c58 /src/corelib/tools/qmessageauthenticationcode.cpp
parente91be71ef04c22e478a3e98256ded87b28d0d767 (diff)
Compile fix: undefine types before defining them
On NetBSD, the types uint64_t, uint32_t and uint8_t are already defined in sys/types.h which leads to compile errors. Those types need to be properly undefined before defining them with the Qt code. Change-Id: Icd58f421619f15b899cf5c5de1cfb22a519a4e4b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qmessageauthenticationcode.cpp')
-rw-r--r--src/corelib/tools/qmessageauthenticationcode.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/corelib/tools/qmessageauthenticationcode.cpp b/src/corelib/tools/qmessageauthenticationcode.cpp
index 5e7f1fc431..f25a76d450 100644
--- a/src/corelib/tools/qmessageauthenticationcode.cpp
+++ b/src/corelib/tools/qmessageauthenticationcode.cpp
@@ -40,9 +40,29 @@
available on all platforms (MSVC 2008, for example), we #define them to the
Qt equivalents.
*/
+
+#ifdef uint64_t
+#undef uint64_t
+#endif
+
#define uint64_t QT_PREPEND_NAMESPACE(quint64)
+
+#ifdef uint32_t
+#undef uint32_t
+#endif
+
#define uint32_t QT_PREPEND_NAMESPACE(quint32)
+
+#ifdef uint8_t
+#undef uint8_t
+#endif
+
#define uint8_t QT_PREPEND_NAMESPACE(quint8)
+
+#ifdef int_least16_t
+#undef int_least16_t
+#endif
+
#define int_least16_t QT_PREPEND_NAMESPACE(qint16)
// Header from rfc6234 with 1 modification: