From 2e5454f89275d138e85b62983c2845e2e9809e56 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 29 May 2018 17:10:09 +0530 Subject: [PATCH] meson: We actually support 7+, not Vista+ https://gitlab.gnome.org/GNOME/glib/issues/504#note_225707 --- meson.build | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 62989bedd..8e18be3d3 100644 --- a/meson.build +++ b/meson.build @@ -359,7 +359,7 @@ add_project_arguments(cc.get_supported_arguments(test_c_args), language: 'c') # improve this. glib_link_flags = cc.get_supported_link_arguments(test_c_link_args) -# Windows Support (Vista+) +# Windows Support (7+) if host_system == 'windows' glib_conf.set('_WIN32_WINNT', '0x0601') endif @@ -438,8 +438,11 @@ if host_system == 'windows' iphlpapi_dep = cc.find_library('iphlpapi') iphlpapi_funcs = ['if_nametoindex', 'if_indextoname'] foreach ifunc : iphlpapi_funcs + iphl_prefix = '''#define _WIN32_WINNT @0@ + #include + #include '''.format(glib_conf.get('_WIN32_WINNT')) if cc.has_function(ifunc, - prefix : '#define _WIN32_WINNT 0x0601\n#include \n#include ', + prefix : iphl_prefix, dependencies : iphlpapi_dep) idefine = 'HAVE_' + ifunc.underscorify().to_upper() glib_conf.set(idefine, 1) @@ -1375,8 +1378,8 @@ if has_syspoll and has_systypes #include''' elif has_winsock2 poll_includes = ''' - #define _WIN32_WINNT 0x0600 - #include ''' + #define _WIN32_WINNT @0@ + #include '''.format(glib_conf.get('_WIN32_WINNT')) else # FIXME? error('FIX POLL* defines')