diff options
Diffstat (limited to 'src/corelib/global/qt_pch.h')
-rw-r--r-- | src/corelib/global/qt_pch.h | 7 |
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 |