about summary refs log tree commit diff
path: root/resolv/nss_dns/dns-network.c
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:57 +0200
commite1fcf21474c5b522fdad4ac0191d5dcc3271dba6 (patch)
tree184510f50529327abba7a2c3b86222f04f0566b1 /resolv/nss_dns/dns-network.c
parentea9878ec271c791880fcbbe519d70c42f8113750 (diff)
downloadglibc-e1fcf21474c5b522fdad4ac0191d5dcc3271dba6.tar.gz
glibc-e1fcf21474c5b522fdad4ac0191d5dcc3271dba6.tar.xz
glibc-e1fcf21474c5b522fdad4ac0191d5dcc3271dba6.zip
resolv: Move nss_dns into libc
No abilist updates are needed because the symbols were GLIBC_PRIVATE.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'resolv/nss_dns/dns-network.c')
-rw-r--r--resolv/nss_dns/dns-network.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c
index 801313caec..74b78959c2 100644
--- a/resolv/nss_dns/dns-network.c
+++ b/resolv/nss_dns/dns-network.c
@@ -67,11 +67,10 @@
 #include "nsswitch.h"
 #include <arpa/inet.h>
 #include <arpa/nameser.h>
+#include <nss_dns.h>
 #include <resolv/resolv-internal.h>
 #include <resolv/resolv_context.h>
 
-NSS_DECLARE_MODULE_FUNCTIONS (dns)
-
 /* Maximum number of aliases we allow.  */
 #define MAX_NR_ALIASES	48
 
@@ -152,7 +151,7 @@ _nss_dns_getnetbyname_r (const char *name, struct netent *result,
   __resolv_context_put (ctx);
   return status;
 }
-
+libc_hidden_def (_nss_dns_getnetbyname_r)
 
 enum nss_status
 _nss_dns_getnetbyaddr_r (uint32_t net, int type, struct netent *result,
@@ -246,7 +245,7 @@ _nss_dns_getnetbyaddr_r (uint32_t net, int type, struct netent *result,
   __resolv_context_put (ctx);
   return status;
 }
-
+libc_hidden_def (_nss_dns_getnetbyaddr_r)
 
 static enum nss_status
 getanswer_r (const querybuf *answer, int anslen, struct netent *result,
@@ -347,7 +346,7 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
 	  n = -1;
 	}
 
-      if (n < 0 || res_dnok (bp) == 0)
+      if (n < 0 || __libc_res_dnok (bp) == 0)
 	break;
       cp += n;
 
@@ -381,7 +380,7 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
 	      n = -1;
 	    }
 
-	  if (n < 0 || !res_hnok (bp))
+	  if (n < 0 || !__libc_res_hnok (bp))
 	    {
 	      /* XXX What does this mean?  The original form from bind
 		 returns NULL. Incrementing cp has no effect in any case.
@@ -469,7 +468,7 @@ getanswer_r (const querybuf *answer, int anslen, struct netent *result,
 		    /* If we are out of digits now, there are two cases:
 		       1. We are done with digits and now see "in-addr.arpa".
 		       2. This is not the droid we are looking for.  */
-		    if (!isdigit (*p) && !strcasecmp (p, "in-addr.arpa"))
+		    if (!isdigit (*p) && !__strcasecmp (p, "in-addr.arpa"))
 		      {
 			result->n_net = val;
 			return NSS_STATUS_SUCCESS;