aboutsummaryrefslogtreecommitdiff
path: root/resolv/compat-gethnamaddr.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-10-04 11:52:10 +0200
committerFlorian Weimer <fweimer@redhat.com>2016-12-31 18:55:14 +0100
commitb76e065991ec01299225d9da90a627ebe6c1ac97 (patch)
treeac94cc82b134096975419ced320f6ed329130756 /resolv/compat-gethnamaddr.c
parent5840c75c2d6a9b980d6789f2ca7d47a9fa067263 (diff)
downloadglibc-b76e065991ec01299225d9da90a627ebe6c1ac97.zip
glibc-b76e065991ec01299225d9da90a627ebe6c1ac97.tar.gz
glibc-b76e065991ec01299225d9da90a627ebe6c1ac97.tar.bz2
resolv: Deprecate the "inet6" option and RES_USE_INET6 [BZ #19582]
Diffstat (limited to 'resolv/compat-gethnamaddr.c')
-rw-r--r--resolv/compat-gethnamaddr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/resolv/compat-gethnamaddr.c b/resolv/compat-gethnamaddr.c
index 6d2292b..813c7d4 100644
--- a/resolv/compat-gethnamaddr.c
+++ b/resolv/compat-gethnamaddr.c
@@ -66,7 +66,7 @@
# include <stdio.h>
# include <netdb.h>
-# include <resolv.h>
+# include <resolv/resolv-internal.h>
# include <ctype.h>
# include <errno.h>
# include <stdlib.h>
@@ -412,7 +412,7 @@ getanswer (const querybuf *answer, int anslen, const char *qname, int qtype)
bp += n;
buflen -= n;
}
- if (_res.options & RES_USE_INET6)
+ if (res_use_inet6 ())
map_v4v6_hostent(&host, &bp, &buflen);
__set_h_errno (NETDB_SUCCESS);
return (&host);
@@ -434,7 +434,7 @@ res_gethostbyname (const char *name)
__set_h_errno (NETDB_INTERNAL);
return (NULL);
}
- if (_res.options & RES_USE_INET6) {
+ if (res_use_inet6 ()) {
hp = res_gethostbyname2(name, AF_INET6);
if (hp)
return (hp);
@@ -516,7 +516,7 @@ res_gethostbyname2 (const char *name, int af)
h_addr_ptrs[0] = (char *)host_addr;
h_addr_ptrs[1] = NULL;
host.h_addr_list = h_addr_ptrs;
- if (_res.options & RES_USE_INET6)
+ if (res_use_inet6 ())
map_v4v6_hostent(&host, &bp, &len);
__set_h_errno (NETDB_SUCCESS);
return (&host);
@@ -665,7 +665,7 @@ res_gethostbyaddr (const void *addr, socklen_t len, int af)
memmove(host_addr, addr, len);
h_addr_ptrs[0] = (char *)host_addr;
h_addr_ptrs[1] = NULL;
- if (af == AF_INET && (_res.options & RES_USE_INET6)) {
+ if (af == AF_INET && res_use_inet6 ()) {
map_v4v6_address((char*)host_addr, (char*)host_addr);
hp->h_addrtype = AF_INET6;
hp->h_length = IN6ADDRSZ;
@@ -724,7 +724,7 @@ _gethtent (void)
af = AF_INET6;
len = IN6ADDRSZ;
} else if (inet_pton(AF_INET, p, host_addr) > 0) {
- if (_res.options & RES_USE_INET6) {
+ if (res_use_inet6 ()) {
map_v4v6_address((char*)host_addr, (char*)host_addr);
af = AF_INET6;
len = IN6ADDRSZ;
@@ -768,7 +768,7 @@ _gethtbyname (const char *name)
{
struct hostent *hp;
- if (_res.options & RES_USE_INET6) {
+ if (res_use_inet6 ()) {
hp = _gethtbyname2(name, AF_INET6);
if (hp)
return (hp);