Commit 45d6d772 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

Fix linking.

parent ab1251ee
...@@ -567,12 +567,10 @@ int vlc_getnameinfo( const struct sockaddr *sa, int salen, ...@@ -567,12 +567,10 @@ int vlc_getnameinfo( const struct sockaddr *sa, int salen,
i_servlen = 0; i_servlen = 0;
} }
#if defined (HAVE_GETNAMEINFO) #ifndef WIN32
i_val = getnameinfo(sa, salen, host, hostlen, psz_serv, i_servlen, flags); i_val = getnameinfo(sa, salen, host, hostlen, psz_serv, i_servlen, flags);
#elif defined (WIN32)
i_val = ws2_getnameinfo (sa, salen, host, hostlen, psz_serv, i_servlen, flags);
#else #else
i_val = __getnameinfo (sa, salen, host, hostlen, psz_serv, i_servlen, flags); i_val = ws2_getnameinfo (sa, salen, host, hostlen, psz_serv, i_servlen, flags);
#endif #endif
if( portnum != NULL ) if( portnum != NULL )
...@@ -582,7 +580,6 @@ int vlc_getnameinfo( const struct sockaddr *sa, int salen, ...@@ -582,7 +580,6 @@ int vlc_getnameinfo( const struct sockaddr *sa, int salen,
} }
/* TODO: support for setting sin6_scope_id */
int vlc_getaddrinfo( vlc_object_t *p_this, const char *node, int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
int i_port, const struct addrinfo *p_hints, int i_port, const struct addrinfo *p_hints,
struct addrinfo **res ) struct addrinfo **res )
...@@ -657,7 +654,7 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node, ...@@ -657,7 +654,7 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
#ifdef WIN32 #ifdef WIN32
/* /*
* Winsock tries to resolve numerical IPv4 addresses as AAAA * Winsock tries to resolve numerical IPv4 addresses as AAAA
* and IPv6 addresses as A... There comes the work around. * and IPv6 addresses as A... There comes the bug-to-bug fix.
*/ */
if ((hints.ai_flags & AI_NUMERICHOST) == 0) if ((hints.ai_flags & AI_NUMERICHOST) == 0)
{ {
...@@ -699,7 +696,7 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node, ...@@ -699,7 +696,7 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
var_Get (p_this->p_libvlc, "getaddrinfo_mutex", &lock); var_Get (p_this->p_libvlc, "getaddrinfo_mutex", &lock);
vlc_mutex_lock (lock.p_address); vlc_mutex_lock (lock.p_address);
int ret = __getaddrinfo (psz_node, psz_service, &hints, res); int ret = getaddrinfo (psz_node, psz_service, &hints, res);
vlc_mutex_unlock (lock.p_address); vlc_mutex_unlock (lock.p_address);
return ret; return ret;
#endif #endif
...@@ -708,11 +705,9 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node, ...@@ -708,11 +705,9 @@ int vlc_getaddrinfo( vlc_object_t *p_this, const char *node,
void vlc_freeaddrinfo( struct addrinfo *infos ) void vlc_freeaddrinfo( struct addrinfo *infos )
{ {
#if defined (HAVE_GETADDRINFO) #ifndef WIN32
freeaddrinfo (infos); freeaddrinfo (infos);
#elif defined (WIN32)
ws2_freeaddrinfo (infos);
#else #else
__freeaddrinfo( infos ); ws2_freeaddrinfo (infos);
#endif #endif
} }
Supports Markdown
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