summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2021-09-28 17:10:11 -0700
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-09-30 20:29:55 +0000
commite9b56fd1650b7772f9639e2149919d520fd67a9d (patch)
tree206a972a1e4632a4718b80a6a02de943b7b8e207 /mkspecs
parent18f6c2c7eeabbbc6c268dd9649ff542fca9c4c8e (diff)
QDateTime: fix build with MinGW: need unistd.h very early
qobject.h has #include <chrono>, which #includes <ctime>, which includes <time.h>. datetime.cpp:2621:23: error: 'localtime_r' was not declared in this scope; did you mean 'localtime_s'? Change-Id: I2bbf422288924c198645fffd16a922719c4ce7d4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 684c9b82b9b8216f406c59deb35cd727ffb6d69b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/win32-g++/qplatformdefs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mkspecs/win32-g++/qplatformdefs.h b/mkspecs/win32-g++/qplatformdefs.h
index c5a70b1445..e9ced3732a 100644
--- a/mkspecs/win32-g++/qplatformdefs.h
+++ b/mkspecs/win32-g++/qplatformdefs.h
@@ -46,6 +46,8 @@
#endif
#endif
+#include <unistd.h> // Defines _POSIX_THREAD_SAFE_FUNCTIONS and others
+
// Get Qt defines/settings
#include "qglobal.h"