From b76e065991ec01299225d9da90a627ebe6c1ac97 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 4 Oct 2016 11:52:10 +0200 Subject: resolv: Deprecate the "inet6" option and RES_USE_INET6 [BZ #19582] --- nss/nss_files/files-hosts.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nss/nss_files/files-hosts.c') diff --git a/nss/nss_files/files-hosts.c b/nss/nss_files/files-hosts.c index 2a4a665..8f330b1 100644 --- a/nss/nss_files/files-hosts.c +++ b/nss/nss_files/files-hosts.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include /* Get implementation for some internal functions. */ @@ -98,8 +98,8 @@ LINE_PARSER }) #define EXTRA_ARGS_VALUE \ - , ((_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) #include "files-XXX.c" #undef EXTRA_ARGS_VALUE @@ -132,7 +132,7 @@ _nss_files_gethostbyname3_r (const char *name, int af, struct hostent *result, { /* XXX Is using _res to determine whether we want to convert IPv4 addresses to IPv6 addresses really the right thing to do? */ - int flags = ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0); + int flags = (res_use_inet6 () ? AI_V4MAPPED : 0); while ((status = internal_getent (stream, result, buffer, buflen, errnop, herrnop, af, flags)) @@ -351,7 +351,7 @@ _nss_files_gethostbyname_r (const char *name, struct hostent *result, char *buffer, size_t buflen, int *errnop, int *herrnop) { - int af = ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET); + int af = (res_use_inet6 () ? AF_INET6 : AF_INET); return _nss_files_gethostbyname3_r (name, af, result, buffer, buflen, errnop, herrnop, NULL, NULL); -- cgit v1.1