diff options
author | Florian Weimer <fweimer@redhat.com> | 2021-07-02 11:45:00 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2021-07-02 11:45:00 +0200 |
commit | dbb949f53d4801b91885b2dfac9875b83a8710bf (patch) | |
tree | 9fdfcaeda7ba0f7f2895f45e233757cdfdb1eef3 /resolv/gai_cancel.c | |
parent | 813c6ec808556553be9d39e900a3fc97ceb32330 (diff) | |
download | glibc-dbb949f53d4801b91885b2dfac9875b83a8710bf.tar.gz glibc-dbb949f53d4801b91885b2dfac9875b83a8710bf.tar.xz glibc-dbb949f53d4801b91885b2dfac9875b83a8710bf.zip |
resolv: Move libanl into libc (if libpthread is in libc)
The symbols gai_cancel, gai_error, gai_suspend, getaddrinfo_a, __gai_suspend_time64 were moved using scripts/move-symbol-to-libc.py. For Hurd (which remains !PTHREAD_IN_LIBC), a few #define redirects had to be added because several pthread functions are not available under __. (Linux uses __ prefixes for most hidden aliases, and has to in some cases to avoid linknamespace issues.)
Diffstat (limited to 'resolv/gai_cancel.c')
-rw-r--r-- | resolv/gai_cancel.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/resolv/gai_cancel.c b/resolv/gai_cancel.c index 5d398ffea8..aa6ba03e5a 100644 --- a/resolv/gai_cancel.c +++ b/resolv/gai_cancel.c @@ -18,18 +18,18 @@ #include <netdb.h> #include <pthread.h> - +#include <shlib-compat.h> #include <gai_misc.h> int -gai_cancel (struct gaicb *gaicbp) +__gai_cancel (struct gaicb *gaicbp) { int result = 0; int status; /* Request the mutex. */ - pthread_mutex_lock (&__gai_requests_mutex); + __pthread_mutex_lock (&__gai_requests_mutex); /* Find the request among those queued but not yet running. */ status = __gai_remove_request (gaicbp); @@ -41,7 +41,16 @@ gai_cancel (struct gaicb *gaicbp) result = EAI_ALLDONE; /* Release the mutex. */ - pthread_mutex_unlock (&__gai_requests_mutex); + __pthread_mutex_unlock (&__gai_requests_mutex); return result; } +#if PTHREAD_IN_LIBC +versioned_symbol (libc, __gai_cancel, gai_cancel, GLIBC_2_34); + +# if OTHER_SHLIB_COMPAT (libanl, GLIBC_2_2_3, GLIBC_2_34) +compat_symbol (libanl, __gai_cancel, gai_cancel, GLIBC_2_2_3); +# endif +#else /* !PTHREAD_IN_LIBC */ +strong_alias (__gai_cancel, gai_cancel) +#endif /* !PTHREAD_IN_LIBC */ |