diff options
| author | Fabio Alessandrelli | 2016-11-03 05:20:26 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-01-12 19:15:30 +0100 |
| commit | 9c8ecb45f8516a2d45c18c50093887448d8a64e8 (patch) | |
| tree | fc173196b88a960343ee2c1109b3fedbaaebc22a /drivers | |
| parent | 8a5596322d586007d66c90b25ef2dd09d196fdfa (diff) | |
| download | godot-9c8ecb45f8516a2d45c18c50093887448d8a64e8.tar.gz godot-9c8ecb45f8516a2d45c18c50093887448d8a64e8.tar.zst godot-9c8ecb45f8516a2d45c18c50093887448d8a64e8.zip | |
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/unix/ip_unix.cpp | 4 | ||||
| -rw-r--r-- | drivers/unix/socket_helpers.h | 10 |
2 files changed, 5 insertions, 9 deletions
diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index 0e8e5f009..df2b024b4 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 373feb4b8..6d4f7e751 100644 --- a/drivers/unix/socket_helpers.h +++ b/drivers/unix/socket_helpers.h @@ -3,11 +3,11 @@ #include <string.h> -#ifdef WINDOWS_ENABLED - // Workaround mingw missing flags! - #ifndef IPV6_V6ONLY - #define IPV6_V6ONLY 27 - #endif +#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 |
