]> git.sesse.net Git - vlc/blobdiff - include/network.h
Don't try IPv6 SSM if not defined
[vlc] / include / network.h
index 1f6d197253c124e799fb49f33cfc1d3e568e1614..6543d90f8655507f4e0bbb800fbfc0daaf1d8f38 100644 (file)
@@ -33,6 +33,7 @@
 #   if defined(UNDER_CE)
 #       define HAVE_STRUCT_ADDRINFO
 #   else
+#       define _NO_OLDNAMES 1
 #       include <io.h>
 #   endif
 #   include <winsock2.h>
@@ -89,10 +90,9 @@ int net_Socket (vlc_object_t *obj, int family, int socktype, int proto);
 #define net_OpenTCP(a, b, c) __net_ConnectTCP(VLC_OBJECT(a), b, c)
 VLC_EXPORT( int, __net_ConnectTCP, ( vlc_object_t *p_this, const char *psz_host, int i_port ) );
 
-/*int *net_Listen, (vlc_object_t *p_this, const char *psz_host, int i_port,
-                                int family, int socktype, int protocol);*/
-VLC_EXPORT( int, net_ListenSingle, (vlc_object_t *p_this, const char *psz_host, int i_port,
-                                    int family, int socktype, int protocol) );
+int *net_Listen (vlc_object_t *p_this, const char *psz_host, int i_port,
+                                int family, int socktype, int protocol);
+VLC_EXPORT( int, net_ListenSingle, (vlc_object_t *p_this, const char *psz_host, int i_port, int family, int socktype, int protocol) );
 
 #define net_ListenTCP(a, b, c) __net_ListenTCP(VLC_OBJECT(a), b, c)
 VLC_EXPORT( int *, __net_ListenTCP, ( vlc_object_t *, const char *, int ) );
@@ -260,7 +260,7 @@ net_SockAddrIsMulticast (const struct sockaddr *addr, socklen_t len)
             struct sockaddr_in *v4 = (struct sockaddr_in *)addr;
             if (len < sizeof (*v4))
                 return VLC_FALSE;
-            return IN_MULTICAST (v4->sin_addr.s_addr) != 0;
+            return IN_MULTICAST (ntohl (v4->sin_addr.s_addr)) != 0;
         }
 #endif