aboutsummaryrefslogtreecommitdiff
path: root/drivers/unix
diff options
context:
space:
mode:
authorRémi Verschelde2017-01-12 17:14:19 +0100
committerGitHub2017-01-12 17:14:19 +0100
commit430f3e6043e806a350c82e054395b48367ecb8a7 (patch)
tree908e83375a4b6b416b6e7678869802cf322815b0 /drivers/unix
parentad224295c0a24a0588351c4ab750e43867bcdde9 (diff)
parent65483d57bf322f847ecb1ab906e8f4fac49f2557 (diff)
downloadgodot-430f3e6043e806a350c82e054395b48367ecb8a7.tar.gz
godot-430f3e6043e806a350c82e054395b48367ecb8a7.tar.zst
godot-430f3e6043e806a350c82e054395b48367ecb8a7.zip
Merge pull request #7506 from Faless/winver_unif
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 ffb37b4f5..fc0b3facc 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 962f228c3..6d4f7e751 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