From 391e02236b931132c0e8b5ba4c3b087c2aaa1044 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 19 Jul 2021 07:55:27 +0200 Subject: 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 Tested-by: Carlos O'Donell --- resolv/nss_dns/dns-canon.c | 4 ++-- resolv/nss_dns/dns-network.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'resolv/nss_dns') diff --git a/resolv/nss_dns/dns-canon.c b/resolv/nss_dns/dns-canon.c index b7340d7..c5718ce 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 2be9bfe..801313c 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); -- cgit v1.1