diff options
Diffstat (limited to 'drivers/unix')
| -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 |
