From: Alon Bar-Lev Date: Wed, 29 Feb 2012 20:11:41 +0000 (+0200) Subject: build: correct place to alter WINVER is at build system X-Git-Tag: v2.3_alpha2~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bae6143d3fa1bf47d36d6f3a55afcd26aa8403e4;p=thirdparty%2Fopenvpn.git build: correct place to alter WINVER is at build system Signed-off-by: Alon Bar-Lev Acked-by: Samuli Seppänen Signed-off-by: David Sommerseth --- diff --git a/configure.ac b/configure.ac index 1c4d66ca0..aa1d5095e 100644 --- a/configure.ac +++ b/configure.ac @@ -342,7 +342,7 @@ case "$host" in ;; *-mingw*) AC_DEFINE(TARGET_WIN32, 1, [Are we running WIN32?]) - CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN" + CPPFLAGS="${CPPFLAGS} -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501" OPENVPN_ADD_LIBS(-lgdi32) OPENVPN_ADD_LIBS(-lws2_32) OPENVPN_ADD_LIBS(-lwininet) diff --git a/syshead.h b/syshead.h index 0235abd67..e8e70d280 100644 --- a/syshead.h +++ b/syshead.h @@ -28,10 +28,6 @@ /* * Only include if not during configure */ -#ifdef WIN32 -/* PF_INET6: win32 ipv6 exists only after 0x0501 (XP) */ -#define WINVER 0x0501 -#endif #ifndef PACKAGE_NAME #include "config.h" #include "compat.h" diff --git a/win/msvc.mak.in b/win/msvc.mak.in index 191f370d4..43c333592 100644 --- a/win/msvc.mak.in +++ b/win/msvc.mak.in @@ -38,7 +38,7 @@ LIB_DIRS = -LIBPATH:$(OPENSSL)\lib -LIBPATH:$(POLARSSL)\build\library -LIBPATH:$ EXE = openvpn.exe CPP=cl.exe -CPP_ARG_COMMON=/nologo /W3 -DWIN32 -DWIN32_LEAN_AND_MEAN -D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS $(INCLUDE_DIRS) /FD /c +CPP_ARG_COMMON=/nologo /W3 -DWIN32 -DWIN32_LEAN_AND_MEAN -DWINVER=0x0501 -D_CONSOLE -D_MBCS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS $(INCLUDE_DIRS) /FD /c LINK32=link.exe