Fix builds with some MinGW distributions
Some distributions do not define MINGW_HAS_SECURE_API globally, resulting in methods like wgetenv_s not being declared in the headers. This is probably to keep compatibility with Windows XP. Anyhow, we don't support Windows XP anymore, so we can safely add the define. Note that this is not necessary for the mingw-builds distro, which is the only one we test and support. Anyhow, I don't see any risk in adding these for other distributions. Diff was provided by Philippe Dunski in the bug report. Task-number: QTBUG-67443 Change-Id: I3a64b11541fe95e527ed44bbf8ad94469d457d3d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
c5af04cf8a
commit
780dc2291b
@ -18,7 +18,7 @@ include(g++-base.conf)
|
||||
MAKEFILE_GENERATOR = MINGW
|
||||
QMAKE_PLATFORM = win32 mingw
|
||||
CONFIG += debug_and_release debug_and_release_target precompile_header
|
||||
DEFINES += UNICODE _UNICODE WIN32
|
||||
DEFINES += UNICODE _UNICODE WIN32 MINGW_HAS_SECURE_API=1
|
||||
QMAKE_COMPILER_DEFINES += __GNUC__ _WIN32
|
||||
# can't add 'DEFINES += WIN64' and 'QMAKE_COMPILER_DEFINES += _WIN64' defines for
|
||||
# x86_64 platform similar to 'msvc-desktop.conf' toolchain, because, unlike for MSVC,
|
||||
|
@ -1,5 +1,5 @@
|
||||
EXEEXT = .exe
|
||||
EXTRA_CXXFLAGS = -DUNICODE
|
||||
EXTRA_CXXFLAGS = -DUNICODE -DMINGW_HAS_SECURE_API=1
|
||||
EXTRA_LFLAGS = -static -s -lole32 -luuid -ladvapi32 -lkernel32 -lnetapi32
|
||||
QTOBJS = \
|
||||
qfilesystemengine_win.o \
|
||||
|
Loading…
x
Reference in New Issue
Block a user