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

Some more cleanup

parent 9c8fe7aa
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
static const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}}; static const struct in6_addr in6addr_any = {{IN6ADDR_ANY_INIT}};
# define close closesocket # define close closesocket
#ifndef MCAST_JOIN_SOURCE_GROUP # ifndef MCAST_JOIN_SOURCE_GROUP
/* /*
* I hate manual definitions: Error-prone. Portability hell. * I hate manual definitions: Error-prone. Portability hell.
* Developers shall use UP-TO-DATE compilers. Full point. * Developers shall use UP-TO-DATE compilers. Full point.
...@@ -58,8 +58,10 @@ struct group_source_req ...@@ -58,8 +58,10 @@ struct group_source_req
struct sockaddr_storage gsr_group; /* group address */ struct sockaddr_storage gsr_group; /* group address */
struct sockaddr_storage gsr_source; /* source address */ struct sockaddr_storage gsr_source; /* source address */
}; };
#endif # endif
# ifndef IPV6_PROTECTION_LEVEL
# warning Your C headers are out-of-date. Please update.
# endif
#else #else
# include <sys/types.h> # include <sys/types.h>
# include <unistd.h> # include <unistd.h>
...@@ -184,15 +186,9 @@ static int OpenUDP( vlc_object_t * p_this ) ...@@ -184,15 +186,9 @@ static int OpenUDP( vlc_object_t * p_this )
p_socket->v6only = 1; p_socket->v6only = 1;
#endif #endif
#ifdef WIN32 #ifdef IPV6_PROTECTION_LEVEL
# ifndef IPV6_PROTECTION_LEVEL setsockopt (i_handle, IPPROTO_IPV6, IPV6_PROTECTION_LEVEL,
# define IPV6_PROTECTION_LEVEL 23 &(int){ PROTECTION_LEVEL_UNRESTRICTED }, sizeof (int));
# endif
{
int i_val = 10 /*PROTECTION_LEVEL_UNRESTRICTED*/;
setsockopt( i_handle, IPPROTO_IPV6, IPV6_PROTECTION_LEVEL, &i_val,
sizeof( i_val ) );
}
#endif #endif
/* We may want to reuse an already used socket */ /* We may want to reuse an already used socket */
......
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