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

Minor clean up

parent b99ae3e2
...@@ -25,21 +25,6 @@ ...@@ -25,21 +25,6 @@
* Preamble * 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 #ifdef HAVE_SLP_H
# include <slp.h> # include <slp.h>
#endif #endif
......
...@@ -58,15 +58,16 @@ ...@@ -58,15 +58,16 @@
#include "network.h" #include "network.h"
#ifdef SYS_BEOS #ifdef SYS_BEOS
#define NO_ADDRESS NO_DATA # define NO_ADDRESS NO_DATA
#define PF_INET AF_INET # define PF_INET AF_INET
#define INADDR_NONE 0xFFFFFFFF # define INADDR_NONE 0xFFFFFFFF
#define AF_UNSPEC 0 # define AF_UNSPEC 0
# define PF_UNSPEC AF_UNSPEC
#endif #endif
#define _NI_MASK (NI_NUMERICHOST|NI_NUMERICSERV|NI_NOFQDN|NI_NAMEREQD|\ #define _NI_MASK (NI_NUMERICHOST|NI_NUMERICSERV|NI_NOFQDN|NI_NAMEREQD|\
NI_DGRAM) NI_DGRAM)
# define _AI_MASK (AI_PASSIVE|AI_CANONNAME|AI_NUMERICHOST) #define _AI_MASK (AI_PASSIVE|AI_CANONNAME|AI_NUMERICHOST)
#ifndef HAVE_GAI_STRERROR #ifndef HAVE_GAI_STRERROR
...@@ -559,20 +560,20 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node, ...@@ -559,20 +560,20 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
else else
memcpy( &hints, p_hints, sizeof( hints ) ); memcpy( &hints, p_hints, sizeof( hints ) );
if( hints.ai_family == AF_UNSPEC ) if( hints.ai_family == PF_UNSPEC )
{ {
vlc_value_t val; vlc_value_t val;
var_Create( p_this, "ipv4", VLC_VAR_BOOL | VLC_VAR_DOINHERIT ); var_Create( p_this, "ipv4", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
var_Get( p_this, "ipv4", &val ); var_Get( p_this, "ipv4", &val );
if( val.b_bool ) 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_Create( p_this, "ipv6", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
var_Get( p_this, "ipv6", &val ); var_Get( p_this, "ipv6", &val );
if( val.b_bool ) if( val.b_bool )
hints.ai_family = AF_INET6; hints.ai_family = PF_INET6;
#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