summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2021-09-28 17:10:11 -0700
committerThiago Macieira <thiago.macieira@intel.com>2021-09-29 13:18:21 -0700
commit684c9b82b9b8216f406c59deb35cd727ffb6d69b (patch)
tree93fa0e00f0b38757f02cea408e6cadab7d714f27 /src
parent6d41b64d45cda12370653300fdc2d2685c450014 (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'? Pick-to: 6.2 Change-Id: I2bbf422288924c198645fffd16a922719c4ce7d4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/time/qdatetime.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/corelib/time/qdatetime.cpp b/src/corelib/time/qdatetime.cpp
index 7ee3865611..ab3d923ef9 100644
--- a/src/corelib/time/qdatetime.cpp
+++ b/src/corelib/time/qdatetime.cpp
@@ -66,9 +66,6 @@
# include <qt_windows.h>
#endif
#include <time.h>
-#ifdef Q_CC_MINGW
-# include <unistd.h> // Define _POSIX_THREAD_SAFE_FUNCTIONS to obtain localtime_r()
-#endif
QT_BEGIN_NAMESPACE