summary refs log tree commit diff
path: root/nis
diff options
context:
space:
mode:
Diffstat (limited to 'nis')
-rw-r--r--nis/nss_nis/nis-hosts.c13
-rw-r--r--nis/nss_nisplus/nisplus-hosts.c9
2 files changed, 11 insertions, 11 deletions
diff --git a/nis/nss_nis/nis-hosts.c b/nis/nss_nis/nis-hosts.c
index d266cf2d49..a337797de1 100644
--- a/nis/nss_nis/nis-hosts.c
+++ b/nis/nss_nis/nis-hosts.c
@@ -27,7 +27,7 @@
 #include <string.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-#include <resolv.h>
+#include <resolv/resolv-internal.h>
 #include <libc-lock.h>
 #include <rpcsvc/yp.h>
 #include <rpcsvc/ypclnt.h>
@@ -231,8 +231,8 @@ _nss_nis_gethostent_r (struct hostent *host, char *buffer, size_t buflen,
   __libc_lock_lock (lock);
 
   status = internal_nis_gethostent_r (host, buffer, buflen, errnop, h_errnop,
-			((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET),
-			((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0 ));
+			(res_use_inet6 () ? AF_INET6 : AF_INET),
+			(res_use_inet6 () ? AI_V4MAPPED : 0 ));
 
   __libc_lock_unlock (lock);
 
@@ -351,7 +351,7 @@ _nss_nis_gethostbyname2_r (const char *name, int af, struct hostent *host,
 
   return internal_gethostbyname2_r (name, af, host, buffer, buflen, errnop,
 				    h_errnop,
-			((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0));
+			(res_use_inet6 () ? AI_V4MAPPED : 0));
 }
 
 
@@ -359,7 +359,7 @@ enum nss_status
 _nss_nis_gethostbyname_r (const char *name, struct hostent *host, char *buffer,
 			  size_t buflen, int *errnop, int *h_errnop)
 {
-  if (_res.options & RES_USE_INET6)
+  if (res_use_inet6 ())
     {
       enum nss_status status;
 
@@ -433,8 +433,7 @@ _nss_nis_gethostbyaddr_r (const void *addr, socklen_t addrlen, int af,
   free (result);
 
   int parse_res = parse_line (p, host, data, buflen, errnop, af,
-			      ((_res.options & RES_USE_INET6)
-			       ? AI_V4MAPPED : 0));
+			      (res_use_inet6 () ? AI_V4MAPPED : 0));
   if (__glibc_unlikely (parse_res < 1))
     {
       if (parse_res == -1)
diff --git a/nis/nss_nisplus/nisplus-hosts.c b/nis/nss_nisplus/nisplus-hosts.c
index 2751e5936a..97a03aa21c 100644
--- a/nis/nss_nisplus/nisplus-hosts.c
+++ b/nis/nss_nisplus/nisplus-hosts.c
@@ -43,6 +43,7 @@ static u_long tablename_len;
 	(NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len)
 
 /* Get implementation for some internal functions. */
+#include <resolv/resolv-internal.h>
 #include <resolv/mapv4v6addr.h>
 
 
@@ -321,7 +322,7 @@ internal_nisplus_gethostent_r (struct hostent *host, char *buffer,
 	    }
 	}
 
-      if (_res.options & RES_USE_INET6)
+      if (res_use_inet6 ())
 	parse_res = _nss_nisplus_parse_hostent (result, AF_INET6, host, buffer,
 						buflen, errnop, AI_V4MAPPED);
       else
@@ -488,7 +489,7 @@ _nss_nisplus_gethostbyname2_r (const char *name, int af, struct hostent *host,
 
   return internal_gethostbyname2_r (name, af, host, buffer, buflen, errnop,
 				    herrnop,
-			 ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0));
+				    (res_use_inet6 () ? AI_V4MAPPED : 0));
 }
 
 
@@ -497,7 +498,7 @@ _nss_nisplus_gethostbyname_r (const char *name, struct hostent *host,
 			      char *buffer, size_t buflen, int *errnop,
 			      int *h_errnop)
 {
-  if (_res.options & RES_USE_INET6)
+  if (res_use_inet6 ())
     {
       enum nss_status status;
 
@@ -558,7 +559,7 @@ _nss_nisplus_gethostbyaddr_r (const void *addr, socklen_t addrlen, int af,
 
   parse_res = _nss_nisplus_parse_hostent (result, af, host,
 					  buffer, buflen, errnop,
-					  ((_res.options & RES_USE_INET6)
+					  (res_use_inet6 ()
 					   ? AI_V4MAPPED : 0));
   nis_freeresult (result);