diff options
| author | Florian Weimer <fweimer@redhat.com> | 2021-07-19 07:55:27 +0200 |
|---|---|---|
| committer | Florian Weimer <fweimer@redhat.com> | 2021-07-19 07:56:45 +0200 |
| commit | b165c65c35d0fc4d60d63ae101f4edfa21c0d30b (patch) | |
| tree | 989a2418ecc63814f3afc59a437ee30d96e89042 | |
| parent | 66ac4268f48e4dbcb09b2b6128efa84a6564c1e6 (diff) | |
| download | glibc-b165c65c35d0fc4d60d63ae101f4edfa21c0d30b.tar.xz glibc-b165c65c35d0fc4d60d63ae101f4edfa21c0d30b.zip | |
resolv: Move res_send, res_nsend into libc
Switch to public symbols without __ prefix (due to improved
namespace management).
__res_send, __res_nsend were moved using the script (with
--no-new-version). res_send@@GLIBC_2.34 and res_nsend@@GLIBC_2.34
were added using make update-all-abi.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
70 files changed, 177 insertions, 92 deletions
diff --git a/resolv/Makefile b/resolv/Makefile index 8c28afe5c4..e9689f7e2c 100644 --- a/resolv/Makefile +++ b/resolv/Makefile @@ -49,6 +49,7 @@ routines := \ res-name-checking \ res-state \ res_context_hostalias \ + res_enable_icmp \ res_get_nsaddr \ res_hconf \ res_init \ @@ -56,6 +57,7 @@ routines := \ res_nameinquery \ res_queriesmatch \ res_randomid \ + res_send \ resolv_conf \ resolv_context \ # routines @@ -151,12 +153,10 @@ libresolv-routines := \ res-putget \ res_data \ res_debug \ - res_enable_icmp \ res_hostalias \ res_isourserver \ res_mkquery \ res_query \ - res_send \ resolv-deprecated \ # libresolv-routines diff --git a/resolv/Versions b/resolv/Versions index b084660dde..429b3304c4 100644 --- a/resolv/Versions +++ b/resolv/Versions @@ -6,8 +6,10 @@ libc { __res_dnok; __res_hnok; __res_mailok; + __res_nsend; __res_ownok; __res_randomid; + __res_send; _res; dn_expand; h_errlist; @@ -21,6 +23,7 @@ libc { __res_init; __res_nclose; __res_ninit; + __res_nsend; __res_state; _res_hconf; } @@ -61,7 +64,9 @@ libc { res_dnok; res_hnok; res_mailok; + res_nsend; res_ownok; + res_send; } GLIBC_PRIVATE { %if !PTHREAD_IN_LIBC @@ -86,6 +91,7 @@ libc { __ns_name_uncompress; __ns_name_unpack; __res_context_hostalias; + __res_context_send; __res_get_nsaddr; __res_iclose; __resolv_context_get; @@ -126,7 +132,6 @@ libresolv { __res_isourserver; __res_nameinquery; __res_queriesmatch; - __res_send; __sym_ntop; __sym_ntos; __sym_ston; @@ -159,7 +164,6 @@ libresolv { __res_nquery; __res_nquerydomain; __res_nsearch; - __res_nsend; __res_query; __res_querydomain; __res_search; diff --git a/resolv/res_enable_icmp.c b/resolv/res_enable_icmp.c index 9aa61823df..3bfe6e4f4c 100644 --- a/resolv/res_enable_icmp.c +++ b/resolv/res_enable_icmp.c @@ -27,9 +27,9 @@ __res_enable_icmp (int family, int fd) switch (family) { case AF_INET: - return setsockopt (fd, SOL_IP, IP_RECVERR, &one, sizeof (one)); + return __setsockopt (fd, SOL_IP, IP_RECVERR, &one, sizeof (one)); case AF_INET6: - return setsockopt (fd, SOL_IPV6, IPV6_RECVERR, &one, sizeof (one)); + return __setsockopt (fd, SOL_IPV6, IPV6_RECVERR, &one, sizeof (one)); default: __set_errno (EAFNOSUPPORT); return -1; diff --git a/resolv/res_send.c b/resolv/res_send.c index b502ef5132..9f86f5fe47 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -425,6 +425,7 @@ __res_context_send (struct resolv_context *ctx, __set_errno (terrno); return (-1); } +libc_hidden_def (__res_context_send) /* Common part of res_nsend and res_send. */ static int @@ -444,19 +445,28 @@ context_send_common (struct resolv_context *ctx, } int -res_nsend (res_state statp, const unsigned char *buf, int buflen, - unsigned char *ans, int anssiz) +___res_nsend (res_state statp, const unsigned char *buf, int buflen, + unsigned char *ans, int anssiz) { return context_send_common (__resolv_context_get_override (statp), buf, buflen, ans, anssiz); } +versioned_symbol (libc, ___res_nsend, res_nsend, GLIBC_2_34); +#if OTHER_SHLIB_COMPAT (libresolv, GLIBC_2_2, GLIBC_2_34) +compat_symbol (libresolv, ___res_nsend, __res_nsend, GLIBC_2_2); +#endif int -res_send (const unsigned char *buf, int buflen, unsigned char *ans, int anssiz) +___res_send (const unsigned char *buf, int buflen, unsigned char *ans, + int anssiz) { return context_send_common (__resolv_context_get (), buf, buflen, ans, anssiz); } +versioned_symbol (libc, ___res_send, res_send, GLIBC_2_34); +#if OTHER_SHLIB_COMPAT (libresolv, GLIBC_2_0, GLIBC_2_34) +compat_symbol (libresolv, ___res_send, __res_send, GLIBC_2_0); +#endif /* Private */ @@ -582,9 +592,9 @@ send_vc(res_state statp, st |
