about summary refs log tree commit diff
path: root/nss/nss_files/files-hosts.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-07-07 18:33:52 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-07-07 18:33:52 +0200
commit6212bb67f4695962748a5981e1b9fea105af74f6 (patch)
tree0b6a4e918af592a90eb20ffdb2d28ece568ab4bd /nss/nss_files/files-hosts.c
parent36861a968ad143f662db489cd8f859186ee375c2 (diff)
downloadglibc-6212bb67f4695962748a5981e1b9fea105af74f6.tar.gz
glibc-6212bb67f4695962748a5981e1b9fea105af74f6.tar.xz
glibc-6212bb67f4695962748a5981e1b9fea105af74f6.zip
nss_files: Move into libc
This is the first step towards fixing bug 27959.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'nss/nss_files/files-hosts.c')
-rw-r--r--nss/nss_files/files-hosts.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/nss/nss_files/files-hosts.c b/nss/nss_files/files-hosts.c
index 1dd51d1db9..894b85d501 100644
--- a/nss/nss_files/files-hosts.c
+++ b/nss/nss_files/files-hosts.c
@@ -57,12 +57,13 @@ LINE_PARSER
    STRING_FIELD (addr, isspace, 1);
 
    /* Parse address.  */
-   if (inet_pton (af == AF_UNSPEC ? AF_INET : af, addr, entdata->host_addr)
+   if (__inet_pton (af == AF_UNSPEC ? AF_INET : af, addr, entdata->host_addr)
        > 0)
      af = af == AF_UNSPEC ? AF_INET : af;
    else
      {
-       if (af == AF_INET && inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
+       if (af == AF_INET
+	   && __inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
 	 {
 	   if (IN6_IS_ADDR_V4MAPPED (entdata->host_addr))
 	     memcpy (entdata->host_addr, entdata->host_addr + 12, INADDRSZ);
@@ -76,7 +77,7 @@ LINE_PARSER
 	     return 0;
 	 }
        else if (af == AF_UNSPEC
-		&& inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
+		&& __inet_pton (AF_INET6, addr, entdata->host_addr) > 0)
 	 af = AF_INET6;
        else
 	 /* Illegal address: ignore line.  */