summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'qmake')
-rw-r--r--qmake/qmake_pch.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/qmake/qmake_pch.h b/qmake/qmake_pch.h
index 129d8937cb..d1698ec022 100644
--- a/qmake/qmake_pch.h
+++ b/qmake/qmake_pch.h
@@ -41,6 +41,11 @@
#ifndef QMAKE_PCH_H
#define QMAKE_PCH_H
+// 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 <qglobal.h>
#ifdef Q_OS_WIN
# define _POSIX_