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 | |
| parent | 813c6ec808556553be9d39e900a3fc97ceb32330 (diff) | |
| download | 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.)
78 files changed, 498 insertions, 206 deletions
diff --git a/Makeconfig b/Makeconfig index 407df9e6a1..efc7351d71 100644 --- a/Makeconfig +++ b/Makeconfig @@ -1342,9 +1342,11 @@ sysd-rules-targets := $(sort $(foreach p,$(sysd-rules-patterns),\ ifeq ($(pthread-in-libc),yes) libpthread-routines-var = routines librt-routines-var = routines +libanl-routines-var = routines else libpthread-routines-var = libpthread-routines librt-routines-var = librt-routines +libanl-routines-var = libanl-routines endif # A sysdeps Makeconfig fragment may set libc-reentrant to yes. diff --git a/include/netdb.h b/include/netdb.h index 645b85dc62..82e102ff76 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -199,7 +199,11 @@ libc_hidden_proto (ruserpass) # else extern int __gai_suspend_time64 (const struct gaicb *const list[], int ent, const struct __timespec64 *timeout); +# if PTHREAD_IN_LIBC +libc_hidden_proto (__gai_suspend_time64) +# else libanl_hidden_proto (__gai_suspend_time64) +# endif # endif /* The following definition has been removed from the public header diff --git a/resolv/Makefile b/resolv/Makefile index 3fbc320ee1..1d3565d478 100644 --- a/resolv/Makefile +++ b/resolv/Makefile @@ -112,8 +112,11 @@ libresolv-routines := res_comp res_debug \ ns_samedomain ns_date res_enable_icmp \ compat-hooks compat-gethnamaddr -libanl-routines := gai_cancel gai_error gai_misc gai_notify gai_suspend \ - getaddrinfo_a +$(libanl-routines-var) += \ + gai_cancel gai_error gai_misc gai_notify gai_suspend getaddrinfo_a + +libanl-routines += libanl-compat +libanl-shared-only-routines += libanl-compat subdir-dirs = nss_dns vpath %.c nss_dns diff --git a/resolv/Versions b/resolv/Versions index 9a82704af7..d4f6b4b819 100644 --- a/resolv/Versions +++ b/resolv/Versions @@ -21,8 +21,20 @@ libc { # r* __res_state; __res_init; __res_nclose; __res_ninit; _res_hconf; } + GLIBC_2.2.3 { +%if PTHREAD_IN_LIBC + gai_cancel; gai_error; gai_suspend; getaddrinfo_a; +%endif + } + GLIBC_2.34 { +%if PTHREAD_IN_LIBC + gai_cancel; gai_error; gai_suspend; getaddrinfo_a; +%endif + } GLIBC_PRIVATE { +%if !PTHREAD_IN_LIBC __gai_sigqueue; +%endif __h_errno; __resp; @@ -103,6 +115,10 @@ libnss_dns { libanl { GLIBC_2.2.3 { +%if PTHREAD_IN_LIBC + __libanl_version_placeholder; +%else gai_cancel; gai_error; gai_suspend; getaddrinfo_a; |
