mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1109940 - Wrap Android DNS resolver functions. r=glandium
This commit is contained in:
parent
487a7a9edd
commit
17c907caf2
@ -7286,6 +7286,9 @@ if test "$OS_TARGET" = Android; then
|
||||
if test "$MOZ_WIDGET_TOOLKIT" = gonk -a -n "$MOZ_NUWA_PROCESS"; then
|
||||
MOZ_GLUE_WRAP_LDFLAGS="${MOZ_GLUE_WRAP_LDFLAGS} -Wl,--wrap=pthread_create,--wrap=epoll_wait,--wrap=poll,--wrap=pthread_cond_timedwait,--wrap=pthread_cond_wait,--wrap=epoll_create,--wrap=epoll_ctl,--wrap=close,--wrap=pthread_key_create,--wrap=pthread_key_delete,--wrap=socketpair,--wrap=pthread_self,--wrap=pthread_mutex_lock,--wrap=pthread_join,--wrap=pipe,--wrap=pipe2"
|
||||
fi
|
||||
if test "$MOZ_WIDGET_TOOLKIT" = android; then
|
||||
MOZ_GLUE_WRAP_LDFLAGS="${MOZ_GLUE_WRAP_LDFLAGS} -Wl,--wrap=getaddrinfo,--wrap=freeaddrinfo,--wrap=gai_strerror"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST_LIST(MOZ_GLUE_WRAP_LDFLAGS)
|
||||
|
@ -407,11 +407,11 @@ do { \
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
extern const char *
|
||||
gai_strerror(int ecode);
|
||||
__wrap_gai_strerror(int ecode);
|
||||
extern void
|
||||
freeaddrinfo(struct addrinfo *ai);
|
||||
__wrap_freeaddrinfo(struct addrinfo *ai);
|
||||
extern int
|
||||
getaddrinfo(const char *hostname, const char *servname,
|
||||
__wrap_getaddrinfo(const char *hostname, const char *servname,
|
||||
const struct addrinfo *hints, struct addrinfo **res);
|
||||
|
||||
int android_sdk_version;
|
||||
@ -431,7 +431,7 @@ static int honeycomb_or_later()
|
||||
}
|
||||
|
||||
const char *
|
||||
gai_strerror(int ecode)
|
||||
__wrap_gai_strerror(int ecode)
|
||||
{
|
||||
if (honeycomb_or_later())
|
||||
return gai_strerror(ecode);
|
||||
@ -441,7 +441,7 @@ gai_strerror(int ecode)
|
||||
}
|
||||
|
||||
void
|
||||
freeaddrinfo(struct addrinfo *ai)
|
||||
__wrap_freeaddrinfo(struct addrinfo *ai)
|
||||
{
|
||||
struct addrinfo *next;
|
||||
|
||||
@ -533,7 +533,7 @@ _have_ipv4() {
|
||||
}
|
||||
|
||||
int
|
||||
getaddrinfo(const char *hostname, const char *servname,
|
||||
__wrap_getaddrinfo(const char *hostname, const char *servname,
|
||||
const struct addrinfo *hints, struct addrinfo **res)
|
||||
{
|
||||
struct addrinfo sentinel;
|
||||
@ -731,7 +731,7 @@ getaddrinfo(const char *hostname, const char *servname,
|
||||
free:
|
||||
bad:
|
||||
if (sentinel.ai_next)
|
||||
freeaddrinfo(sentinel.ai_next);
|
||||
__wrap_freeaddrinfo(sentinel.ai_next);
|
||||
*res = NULL;
|
||||
return error;
|
||||
}
|
||||
@ -792,7 +792,7 @@ explore_fqdn(const struct addrinfo *pai, const char *hostname,
|
||||
|
||||
free:
|
||||
if (result)
|
||||
freeaddrinfo(result);
|
||||
__wrap_freeaddrinfo(result);
|
||||
return error;
|
||||
}
|
||||
|
||||
@ -860,7 +860,7 @@ explore_null(const struct addrinfo *pai, const char *servname,
|
||||
|
||||
free:
|
||||
if (sentinel.ai_next)
|
||||
freeaddrinfo(sentinel.ai_next);
|
||||
__wrap_freeaddrinfo(sentinel.ai_next);
|
||||
return error;
|
||||
}
|
||||
|
||||
@ -947,7 +947,7 @@ explore_numeric(const struct addrinfo *pai, const char *hostname,
|
||||
free:
|
||||
bad:
|
||||
if (sentinel.ai_next)
|
||||
freeaddrinfo(sentinel.ai_next);
|
||||
__wrap_freeaddrinfo(sentinel.ai_next);
|
||||
return error;
|
||||
}
|
||||
|
||||
@ -2005,7 +2005,7 @@ _gethtent(_pseudo_FILE * __restrict__ hostf, const char *name, const struct addr
|
||||
found:
|
||||
hints = *pai;
|
||||
hints.ai_flags = AI_NUMERICHOST;
|
||||
error = getaddrinfo(addr, NULL, &hints, &res0);
|
||||
error = __wrap_getaddrinfo(addr, NULL, &hints, &res0);
|
||||
if (error)
|
||||
goto again;
|
||||
for (res = res0; res; res = res->ai_next) {
|
||||
@ -2014,7 +2014,7 @@ found:
|
||||
|
||||
if (pai->ai_flags & AI_CANONNAME) {
|
||||
if (get_canonname(pai, res, cname) != 0) {
|
||||
freeaddrinfo(res0);
|
||||
__wrap_freeaddrinfo(res0);
|
||||
goto again;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user