summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobal_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qglobal_p.h')
-rw-r--r--src/corelib/global/qglobal_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal_p.h b/src/corelib/global/qglobal_p.h
index d52f6268e4..58bc8b7bf3 100644
--- a/src/corelib/global/qglobal_p.h
+++ b/src/corelib/global/qglobal_p.h
@@ -61,6 +61,9 @@
#endif
#if defined(__cplusplus)
+#ifdef Q_CC_MINGW
+# include <unistd.h> // Define _POSIX_THREAD_SAFE_FUNCTIONS to obtain localtime_r()
+#endif
#include <time.h>
QT_BEGIN_NAMESPACE