aboutsummaryrefslogtreecommitdiff
path: root/resolv/nss_dns
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-07-19 07:55:27 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-07-19 07:56:21 +0200
commit391e02236b931132c0e8b5ba4c3b087c2aaa1044 (patch)
tree692244699dcec82a94b0c2d82f09f9d21c4b7e47 /resolv/nss_dns
parentfd8a87c0c1932de591e7ad108ff6288a4b6b18c9 (diff)
downloadglibc-391e02236b931132c0e8b5ba4c3b087c2aaa1044.tar
glibc-391e02236b931132c0e8b5ba4c3b087c2aaa1044.tar.gz
glibc-391e02236b931132c0e8b5ba4c3b087c2aaa1044.tar.bz2
glibc-391e02236b931132c0e8b5ba4c3b087c2aaa1044.zip
resolv: Move dn_skipname to its own file and into libc
And reformat it to GNU style. dn_skipname is used outside glibc, so do not deprecate it, and export it as dn_skipname (not __dn_skipname). Due to internal users, provide a __libc_dn_skipname alias, and keep __dn_skipname as a pure compatibility symbol. __dn_skipname@GLIBC_2.0 was moved using the script, and dn_skipname@@GLIBC_2.34 was added using make update-all-abi. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'resolv/nss_dns')
-rw-r--r--resolv/nss_dns/dns-canon.c4
-rw-r--r--resolv/nss_dns/dns-network.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/resolv/nss_dns/dns-canon.c b/resolv/nss_dns/dns-canon.c
index b7340d7b9e..c5718ce3ab 100644
--- a/resolv/nss_dns/dns-canon.c
+++ b/resolv/nss_dns/dns-canon.c
@@ -90,7 +90,7 @@ _nss_dns_getcanonname_r (const char *name, char *buffer, size_t buflen,
unsigned char *endptr = ansp.ptr + r;
/* Skip over the query. This is the name, type, and class. */
- int s = __dn_skipname (ptr, endptr);
+ int s = __libc_dn_skipname (ptr, endptr);
if (s < 0)
{
unavail:
@@ -108,7 +108,7 @@ _nss_dns_getcanonname_r (const char *name, char *buffer, size_t buflen,
then type, class, TTL, and the length of the RDATA.
We remember the name start. */
unsigned char *namestart = ptr;
- s = __dn_skipname (ptr, endptr);
+ s = __libc_dn_skipname (ptr, endptr);
if (s < 0)
goto unavail;
diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c
index 2be9bfe2b3..801313caec 100644
--- a/resolv/nss_dns/dns-network.c
+++ b/resolv/nss_dns/dns-network.c
@@ -322,7 +322,7 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
/* Skip the question part. */
while (question_count-- > 0)
{
- int n = __dn_skipname (cp, end_of_message);
+ int n = __libc_dn_skipname (cp, end_of_message);
if (n < 0 || end_of_message - (cp + n) < QFIXEDSZ)
{
__set_h_errno (NO_RECOVERY);