mirror of
https://github.com/videolan/vlc.git
synced 2025-01-06 07:48:29 +08:00
Simplify AI_NUMERICSERV usage
This commit is contained in:
parent
3527f69d9f
commit
fe1fdaf598
@ -40,7 +40,6 @@
|
||||
# include <ws2tcpip.h>
|
||||
# define ENETUNREACH WSAENETUNREACH
|
||||
# define net_errno (WSAGetLastError())
|
||||
# define AI_NUMERICSERV 0
|
||||
extern const char *net_strerror( int val );
|
||||
|
||||
struct iovec
|
||||
@ -274,9 +273,8 @@ struct addrinfo
|
||||
# define AI_NUMERICHOST 4
|
||||
# endif /* if !HAVE_STRUCT_ADDRINFO */
|
||||
|
||||
/* Mac OS X doesn't define that one */
|
||||
#ifndef AI_NUMERICSERV
|
||||
#define AI_NUMERICSERV 0
|
||||
# define AI_NUMERICSERV 0
|
||||
#endif
|
||||
|
||||
VLC_EXPORT( const char *, vlc_gai_strerror, ( int ) );
|
||||
|
@ -591,9 +591,7 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
|
||||
AI_PASSIVE |
|
||||
AI_CANONNAME |
|
||||
AI_NUMERICHOST |
|
||||
#ifdef AI_NUMERICSERV
|
||||
AI_NUMERICSERV |
|
||||
#endif
|
||||
#ifdef AI_ALL
|
||||
AI_ALL |
|
||||
#endif
|
||||
@ -615,10 +613,8 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
|
||||
hints.ai_flags = p_hints->ai_flags & safe_flags;
|
||||
}
|
||||
|
||||
#ifdef AI_NUMERICSERV
|
||||
/* We only ever use port *numbers* */
|
||||
hints.ai_flags |= AI_NUMERICSERV;
|
||||
#endif
|
||||
|
||||
if( hints.ai_family == AF_UNSPEC )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user