]> git.sesse.net Git - vlc/commitdiff
Fix setsockopt(IPV6_V6ONLY)
authorRémi Denis-Courmont <rem@videolan.org>
Fri, 5 Jan 2007 11:28:28 +0000 (11:28 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Fri, 5 Jan 2007 11:28:28 +0000 (11:28 +0000)
src/network/io.c

index fcb06b41e438ea850d7647807771db98628547b7..70a916eaa04e4a20e6221daedd261b4696aa5781 100644 (file)
@@ -97,7 +97,8 @@ int net_Socket (vlc_object_t *p_this, int family, int socktype,
      * than ::ffff:w.x.y.z
      */
     if (family == AF_INET6)
-        setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, &(int){ 1 }, sizeof (int));
+        setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, &(int){ 1 },
+                    &(socklen_t){ sizeof (int) });
 #endif
 
 #if defined (WIN32) || defined (UNDER_CE)
@@ -261,7 +262,7 @@ int net_ListenSingle (vlc_object_t *obj, const char *host, int port,
                           &(socklen_t){ sizeof (addr) }) == 0)
          && (addr.ss_family == AF_INET6)
          && setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, &(int){ 0 },
-                        sizeof (int)))
+                        &(socklen_t){ sizeof (int) }))
 #endif
             msg_Err (obj, "Lame IP dual-stack: IPv4 connections might fail.");
     }