Commit df1e5c50 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Define IPV6_PROTECTION_LEVEL manually - closes #96

parent 88a5de2c
......@@ -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 */
......
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment