Преглед изворни кода

Define IPV6_V6ONLY flag if not defined on windows (old mingw versions)

Fabio Alessandrelli пре 9 година
родитељ
комит
bdc7ca84ca
1 измењених фајлова са 7 додато и 0 уклоњено
  1. 7 0
      drivers/unix/socket_helpers.h

+ 7 - 0
drivers/unix/socket_helpers.h

@@ -3,6 +3,13 @@
 
 
 #include <string.h>
 #include <string.h>
 
 
+#ifdef WINDOWS_ENABLED
+ // Workaround mingw missing flags!
+ #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
 // helpers for sockaddr -> IP_Address and back, should work for posix and winsock. All implementations should use this
 
 
 static size_t _set_sockaddr(struct sockaddr_storage* p_addr, const IP_Address& p_ip, int p_port) {
 static size_t _set_sockaddr(struct sockaddr_storage* p_addr, const IP_Address& p_ip, int p_port) {