summaryrefslogtreecommitdiff
path: root/drivers/unix
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2016-11-03 05:20:26 +0100
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2017-01-12 17:13:19 +0100
commit65483d57bf322f847ecb1ab906e8f4fac49f2557 (patch)
tree908e83375a4b6b416b6e7678869802cf322815b0 /drivers/unix
parentad224295c0a24a0588351c4ab750e43867bcdde9 (diff)
Improvements to scons defined WINVER/_WIN32_WINNT
Diffstat (limited to 'drivers/unix')
-rw-r--r--drivers/unix/ip_unix.cpp4
-rw-r--r--drivers/unix/socket_helpers.h14
2 files changed, 5 insertions, 13 deletions
diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp
index ffb37b4f59..fc0b3faccc 100644
--- a/drivers/unix/ip_unix.cpp
+++ b/drivers/unix/ip_unix.cpp
@@ -33,10 +33,6 @@
#include <string.h>
#ifdef WINDOWS_ENABLED
- // Workaround mingw missing flags!
- #ifndef AI_ADDRCONFIG
- #define AI_ADDRCONFIG 0x00000400
- #endif
#include <ws2tcpip.h>
#include <winsock2.h>
#include <windows.h>
diff --git a/drivers/unix/socket_helpers.h b/drivers/unix/socket_helpers.h
index 962f228c3c..6d4f7e7519 100644
--- a/drivers/unix/socket_helpers.h
+++ b/drivers/unix/socket_helpers.h
@@ -3,15 +3,11 @@
#include <string.h>
-#ifdef WINDOWS_ENABLED
- // Workaround mingw missing flags!
- #ifndef IPV6_V6ONLY
- #define IPV6_V6ONLY 27
- #endif
-#endif
-
-#ifdef UWP_ENABLED
-#define in6addr_any IN6ADDR_ANY_INIT
+#if defined(__MINGW32__ ) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 4)
+ // Workaround for mingw-w64 < 4.0
+ #ifndef IPV6_V6ONLY
+ #define IPV6_V6ONLY 27
+ #endif
#endif
// helpers for sockaddr -> IP_Address and back, should work for posix and winsock. All implementations should use this