Skip to contentSkip to conversation

Continuation of MSVS fixes

PATCH In review Lev Stipakov 2 participants 2 messages Oct 6, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Continuation of MSVS fixes

* Upgrade API level to Vista to implement get_default_gateway_ipv6
* Define HAVE_INET_NTOP/PTON since Vista has its own implementation of those

---
 config-msvc.h | 6 ++++++
 msvc-env.bat  | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
config-msvc.h +6 -0
index ffd35f4..07032ce 100644
@@ -128,3 +128,9 @@ typedef __int8		int8_t;
 #include <config-msvc-local.h>
 #endif
 
+// Vista and above has implementation of inet_ntop / inet_pton
+#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
+    #define HAVE_INET_NTOP
+    #define HAVE_INET_PTON
+#endif
+
msvc-env.bat +1 -1
index 2dd0f00..aabed75 100644
@@ -12,7 +12,7 @@ if "%VCHOME%"=="" SET VCHOME=%VSHOME%\VC
 set SOURCEBASE=%cd%
 set SOLUTION=openvpn.sln
 set CPPFLAGS=%CPPFLAGS%;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS
-set CPPFLAGS=%CPPFLAGS%;NTDDI_VERSION=NTDDI_WINXP;_WIN32_WINNT=_WIN32_WINNT_WINXP
+set CPPFLAGS=%CPPFLAGS%;NTDDI_VERSION=NTDDI_VISTA;_WIN32_WINNT=_WIN32_WINNT_VISTA
 set CPPFLAGS=%CPPFLAGS%;_USE_32BIT_TIME_T
 set CPPFLAGS=%CPPFLAGS%;%EXTRA_CPPFLAGS%
 
Signature · 1 line
1.9.1
#1 lore raw

ACK. The need for this change was expected (because GetIpRoute2() is not part of the "XP" API but needs VISTA), and thanks for testing that the *rest* of the new stuff actually works on a MSVC build :-)

Your patch has been applied to the master branch.

commit b0fe94115fc4a75094d15452b7b89a0c0849087c

Author: Lev Stipakov
Date:   Tue Oct 6 14:15:13 2015 +0300
     Continuation of MSVS fixes

     Signed-off-by: Lev Stipakov <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: http://article.gmane.org/gmane.network.openvpn.devel/10194
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering