From fb5752b67525ac3aa4ead8e256de2ea23b70fb5f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 8 Mar 2018 19:14:38 +0000 Subject: [PATCH] Windows: Target Windows Vista or higher This will give us the RFC-2553 inet_ntop() interface. Windows Vista extended security support ended in 2017, but we don't actually need anything from versions newer than Vista yet. Loosely based on part of a patch by Ralf Habacker. Signed-off-by: Simon McVittie https://bugs.freedesktop.org/show_bug.cgi?id=61922 --- cmake/config.h.cmake | 2 ++ configure.ac | 3 +++ dbus/dbus-sysdeps-win.c | 6 ------ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index 14b43e93..3c123b06 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -228,6 +228,8 @@ # define DBUS_WINCE # else # define DBUS_WIN32 + /* Define to the minimum supported Windows version (0x0600 is Vista) */ +# define _WIN32_WINNT 0x0600 # endif #else # define DBUS_UNIX diff --git a/configure.ac b/configure.ac index efed4f0a..2a4fce85 100644 --- a/configure.ac +++ b/configure.ac @@ -156,6 +156,9 @@ if test "$dbus_win" = yes; then if test "$dbus_wince" = yes; then AC_DEFINE(DBUS_WINCE,1,[Defined if we run on a W32 CE API based system]) AC_DEFINE(_WIN32_WCE, 0x0502, [Defined to get newer W32 CE APIs]) + else + AC_DEFINE([_WIN32_WINNT], [0x0600], + [Define to the minimum supported Windows version (0x0600 is Vista)]) fi else AC_DEFINE(DBUS_UNIX,1,[Defined if we run on a Unix-based system]) diff --git a/dbus/dbus-sysdeps-win.c b/dbus/dbus-sysdeps-win.c index 37faacb3..9a270566 100644 --- a/dbus/dbus-sysdeps-win.c +++ b/dbus/dbus-sysdeps-win.c @@ -30,12 +30,6 @@ #define STRSAFE_NO_DEPRECATE -#ifndef DBUS_WINCE -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0501 -#endif -#endif - #include "dbus-internals.h" #include "dbus-sha.h" #include "dbus-sysdeps.h" -- 2.12.3