]> git.sesse.net Git - vlc/commitdiff
Define IPV6_PROTECTION_LEVEL manually - closes #96
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 21 Aug 2005 11:27:15 +0000 (11:27 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 21 Aug 2005 11:27:15 +0000 (11:27 +0000)
modules/misc/network/ipv6.c
src/misc/net.c

index a6217e77947c12f15043c68840bf05b5308bf327..3baa5db697adc982b4c51e11353e9ba05d9477c9 100644 (file)
@@ -195,16 +195,15 @@ static int OpenUDP( vlc_object_t * p_this )
 #endif
 
 #ifdef WIN32
-# ifdef IPV6_PROTECTION_LEVEL
+# ifndef IPV6_PROTECTION_LEVEL
+#   define IPV6_PROTECTION_LEVEL 23
+#  endif
     if( ptr->ai_family == AF_INET6 )
     {
         int i_val = 30 /*PROTECTION_LEVEL_UNRESTRICTED*/;
         setsockopt( fd, IPPROTO_IPV6, IPV6_PROTECTION_LEVEL, &i_val,
                     sizeof( i_val ) );
     }
-# else
-#  warning You are using outdated headers for Winsock !
-# endif
 #endif
 
     /* We may want to reuse an already used socket */
index d3125bd0c08e90a5ac65f9390bf5d38a482c4c97..3368ffc4e1ebc3684250dac9cecaeb15a6b69b67 100644 (file)
@@ -127,16 +127,15 @@ static int net_Socket( vlc_object_t *p_this, int i_family, int i_socktype,
 #endif
 
 #if defined( WIN32 ) || defined( UNDER_CE )
-# ifdef IPV6_PROTECTION_LEVEL
+# ifndef IPV6_PROTECTION_LEVEL
+#  define IPV6_PROTECTION_LEVEL 23
+# endif
     if( i_family == AF_INET6 )
     {
         i_val = 30 /*PROTECTION_LEVEL_UNRESTRICTED*/;
         setsockopt( fd, IPPROTO_IPV6, IPV6_PROTECTION_LEVEL,
                    (const char*)&i_val, sizeof( i_val ) );
     }
-# else
-# warning You are using outdated headers for Winsock !
-# endif
 #endif
     return fd;
 }