From 77c14505bb53b41382c7dfa7175144f63b541f8b Mon Sep 17 00:00:00 2001 From: atraczyk <andreastraczyk@gmail.com> Date: Wed, 14 Dec 2016 18:08:31 -0500 Subject: [PATCH] ip_utils: replace #warning and define IN6_IS_ADDR_UNSPECIFIED - Adds #pragma message to replace #warning directive - Defines _WIN32_WINNT to windows 10 (0x0A00) which allows IN6_IS_ADDR_UNSPECIFIED to be defined in ws2tcpip.h Change-Id: Id2406815830f24bbed744cbaca98dbd4fbcf515d Tuleap: #790 --- src/ip_utils.cpp | 6 +++++- src/ip_utils.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ip_utils.cpp b/src/ip_utils.cpp index 76c089c37e..4b2fd646de 100644 --- a/src/ip_utils.cpp +++ b/src/ip_utils.cpp @@ -247,7 +247,11 @@ ip_utils::getLocalNameservers() { std::vector<IpAddr> res; #if defined __ANDROID__ || defined _WIN32 || TARGET_OS_IPHONE -#warning "Not implemented" +#ifdef _MSC_VER +#pragma message (__FILE__ "(" STR2(__LINE__) ") : -NOTE- " "Not implemented") +#else +#warning "Not implemented" +#endif #else if (not (_res.options & RES_INIT)) res_init(); diff --git a/src/ip_utils.h b/src/ip_utils.h index 8076bcb78d..8b9364e2c7 100644 --- a/src/ip_utils.h +++ b/src/ip_utils.h @@ -32,6 +32,7 @@ extern "C" { #include <ciso646> // fix windows compiler bug #ifdef _WIN32 + #define _WIN32_WINNT 0x0A00 #include <ws2tcpip.h> //define in mingw -- GitLab