summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qt_pch.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-04-17 12:58:41 +0200
committerLars Knoll <lars.knoll@nokia.com>2012-04-17 12:58:52 +0200
commit64255ef6502b1144f7b0aa4b2bf62803e0d4788b (patch)
tree29bf116bfda2ccf61057115690d14f85cc9b085b /src/corelib/global/qt_pch.h
parent4a9fb41a7947d0bb7a47a9625603a436df288b24 (diff)
parent7e0beba891cb963a1d535bd45b0be78b43b8d07f (diff)
Merge remote-tracking branch 'origin/api_changes'
Diffstat (limited to 'src/corelib/global/qt_pch.h')
-rw-r--r--src/corelib/global/qt_pch.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/global/qt_pch.h b/src/corelib/global/qt_pch.h
index 3eaca2fb84..2d5b666917 100644
--- a/src/corelib/global/qt_pch.h
+++ b/src/corelib/global/qt_pch.h
@@ -49,6 +49,12 @@
#if defined __cplusplus
+// for rand_s, _CRT_RAND_S must be #defined before #including stdlib.h.
+// put it at the beginning so some indirect inclusion doesn't break it
+#ifndef _CRT_RAND_S
+#define _CRT_RAND_S
+#endif
+#include <stdlib.h>
#include <qglobal.h>
#ifdef Q_OS_WIN
# define _POSIX_
@@ -63,5 +69,4 @@
#include <qstring.h>
#include <qstringlist.h>
#include <qtextcodec.h>
-#include <stdlib.h>
#endif