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

Minor clean up

parent b99ae3e2
......@@ -25,21 +25,6 @@
* Preamble
*****************************************************************************/
#if defined( UNDER_CE )
# include <winsock.h>
#elif defined( WIN32 )
# include <winsock2.h>
# include <ws2tcpip.h>
# define close closesocket
#else
# include <netdb.h> /* hostent ... */
# include <sys/socket.h>
# include <netinet/in.h>
# ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h> /* inet_ntoa(), inet_aton() */
# endif
#endif
#ifdef HAVE_SLP_H
# include <slp.h>
#endif
......
......@@ -58,15 +58,16 @@
#include "network.h"
#ifdef SYS_BEOS
#define NO_ADDRESS NO_DATA
#define PF_INET AF_INET
#define INADDR_NONE 0xFFFFFFFF
#define AF_UNSPEC 0
# define NO_ADDRESS NO_DATA
# define PF_INET AF_INET
# define INADDR_NONE 0xFFFFFFFF
# define AF_UNSPEC 0
# define PF_UNSPEC AF_UNSPEC
#endif
#define _NI_MASK (NI_NUMERICHOST|NI_NUMERICSERV|NI_NOFQDN|NI_NAMEREQD|\
NI_DGRAM)
# define _AI_MASK (AI_PASSIVE|AI_CANONNAME|AI_NUMERICHOST)
#define _NI_MASK (NI_NUMERICHOST|NI_NUMERICSERV|NI_NOFQDN|NI_NAMEREQD|\
NI_DGRAM)
#define _AI_MASK (AI_PASSIVE|AI_CANONNAME|AI_NUMERICHOST)
#ifndef HAVE_GAI_STRERROR
......@@ -559,20 +560,20 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
else
memcpy( &hints, p_hints, sizeof( hints ) );
if( hints.ai_family == AF_UNSPEC )
if( hints.ai_family == PF_UNSPEC )
{
vlc_value_t val;
var_Create( p_this, "ipv4", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
var_Get( p_this, "ipv4", &val );
if( val.b_bool )
hints.ai_family = AF_INET;
hints.ai_family = PF_INET;
#ifdef HAVE_INET_PTON
#ifdef PF_INET6
var_Create( p_this, "ipv6", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
var_Get( p_this, "ipv6", &val );
if( val.b_bool )
hints.ai_family = AF_INET6;
hints.ai_family = PF_INET6;
#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