summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglprogrambinarycache.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-07-10 08:16:56 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-07-10 10:41:23 +0200
commit605062b21fccff919b7894db91b197d120e528f6 (patch)
treefd9efa198420f25895e87ec199950f436add9a9c /src/gui/opengl/qopenglprogrambinarycache.cpp
parentf4b5fa76d76a38c8cd97ac410981a2209d100180 (diff)
Fix MinGW cross-build with precompiled headers on Linux
We need localtime_r() in several places. To have this function declared when including time.h, _POSIX_THREAD_SAFE_FUNCTIONS must be defined. E.g. qdatetime.cpp includes unistd.h before time.h to define said macro. However, this falls apart when precompiled headers are used, because of the following include chain in qt_pch.h: qcoreapplication.h -> qobject.h -> chrono -> time.h This patch ensures that _POSIX_THREAD_SAFE_FUNCTIONS is defined before including time.h in qt_pch.h by including unistd.h early. Fixes: QTBUG-76680 Change-Id: I3875072edf37f45492f29d84fc297a9682e11db4 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/gui/opengl/qopenglprogrambinarycache.cpp')
0 files changed, 0 insertions, 0 deletions