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

Check for error (not that I expect one)

parent e106ff30
...@@ -256,9 +256,10 @@ int net_ListenSingle (vlc_object_t *obj, const char *host, int port, ...@@ -256,9 +256,10 @@ int net_ListenSingle (vlc_object_t *obj, const char *host, int port,
{ {
#ifdef IPV6_V6ONLY #ifdef IPV6_V6ONLY
struct sockaddr_storage addr; struct sockaddr_storage addr;
getsockname (fd, (struct sockaddr *)&addr,
&(socklen_t){ sizeof (addr) }); if ((getsockname (fd, (struct sockaddr *)&addr,
if ((addr.ss_family == AF_INET6) &(socklen_t){ sizeof (addr) }) == 0)
&& (addr.ss_family == AF_INET6)
&& setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, &(int){ 0 }, && setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, &(int){ 0 },
sizeof (int))) sizeof (int)))
#endif #endif
......
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