# if defined(UNDER_CE)
# define HAVE_STRUCT_ADDRINFO
# else
+# define _NO_OLDNAMES 1
# include <io.h>
# endif
# include <winsock2.h>
#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 ) );
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