aboutsummaryrefslogtreecommitdiff
path: root/resolv/gai_error.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-07-02 11:45:00 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-07-02 11:45:00 +0200
commitdbb949f53d4801b91885b2dfac9875b83a8710bf (patch)
tree9fdfcaeda7ba0f7f2895f45e233757cdfdb1eef3 /resolv/gai_error.c
parent813c6ec808556553be9d39e900a3fc97ceb32330 (diff)
downloadglibc-dbb949f53d4801b91885b2dfac9875b83a8710bf.tar
glibc-dbb949f53d4801b91885b2dfac9875b83a8710bf.tar.gz
glibc-dbb949f53d4801b91885b2dfac9875b83a8710bf.tar.bz2
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_error.c')
-rw-r--r--resolv/gai_error.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/resolv/gai_error.c b/resolv/gai_error.c
index 4f9ac557b7..9fe9c400ee 100644
--- a/resolv/gai_error.c
+++ b/resolv/gai_error.c
@@ -17,11 +17,20 @@
<https://www.gnu.org/licenses/>. */
#include <netdb.h>
-
+#include <shlib-compat.h>
#include <gai_misc.h>
int
-gai_error (struct gaicb *req)
+__gai_error (struct gaicb *req)
{
return req->__return;
}
+#if PTHREAD_IN_LIBC
+versioned_symbol (libc, __gai_error, gai_error, GLIBC_2_34);
+
+# if OTHER_SHLIB_COMPAT (libanl, GLIBC_2_2_3, GLIBC_2_34)
+compat_symbol (libanl, __gai_error, gai_error, GLIBC_2_2_3);
+# endif
+#else /* !PTHREAD_IN_LIBC */
+strong_alias (__gai_error, gai_error)
+#endif /* !PTHREAD_IN_LIBC */