Meson: Set _WIN32_WINNT to 0x0601 (Windows 7)

We want to set _WIN32_WINNT so that functions will be properly found in
the headers, to target the NT6.1+ (Windows 7+) APIs.

Also improve the checks for if_nametoindex() and if_indextoname() on
Windows as they are supported in Windows Vista+, but they have
to be checked by linking against iphlpapi.lib (or -liphlpapi).  On other
platforms, they are still checked as they were before.

https://bugzilla.gnome.org/show_bug.cgi?id=783270
This commit is contained in:
Chun-wei Fan
2017-07-18 22:19:54 +08:00
parent ea6ac5f71e
commit 54aee1f627
3 changed files with 27 additions and 4 deletions

View File

@@ -369,7 +369,7 @@ if host_system == 'windows'
contenttype_sources += ['gcontenttype-win32.c']
platform_deps += [cc.find_library('shlwapi'),
cc.find_library('dnsapi'),
cc.find_library('iphlpapi'),
iphlpapi_dep,
winsock2]
win32_sources += [
'gwin32registrykey.c',