MinGW: Explicitly define NTDDI_VERSION

Define NTDDI_VERSION, just like _WIN32_WINNT, to be Windows Vista.
Usually NTDDI_VERSION is automatically set by MinGW headers to the value
that matches _WIN32_WINNT. However, for precompiled headers the inclusion
order is that _WIN32_WINNT is set _after_ the relevant MinGW header is
parsed, so this can fail.

The alternative would be to set _WIN32_WINNT via a compiler flag, e.g.
in the mkspecs.

Change-Id: Id59e7083f0d3e00491b54e87647c6c9fabb99795
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Kai Koehne 2016-11-04 12:38:50 +01:00
parent ef5b4d2ada
commit aa7e764058

View File

@ -53,6 +53,9 @@
# ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x600
# endif
# ifndef NTDDI_VERSION
# define NTDDI_VERSION 0x06000000
# endif
#endif
#ifndef NOMINMAX