aboutsummaryrefslogtreecommitdiffstats
path: root/lib/lwres/getaddrinfo.c
diff options
context:
space:
mode:
authorErwin Lansing <erwin@FreeBSD.org>2012-12-17 10:58:24 +0000
committerErwin Lansing <erwin@FreeBSD.org>2012-12-17 10:58:24 +0000
commit823eb5f9dd4d336a5cd85e9129ab1da5676191df (patch)
tree840dc4ed116d4d74d5bf86e593e1d96d38b4b07f /lib/lwres/getaddrinfo.c
parente65fce108837a6a80efa79ff174877e27db324c0 (diff)
downloadsrc-823eb5f9dd4d336a5cd85e9129ab1da5676191df.tar.gz
src-823eb5f9dd4d336a5cd85e9129ab1da5676191df.zip
Vendor import of Bind 9.6-ESV-R8vendor/bind9/9.6-ESV-R8vendor/bind9-9.6
Approved by: delphij (mentor) Sponsored by: DK Hostmaster A/S
Notes
Notes: svn path=/vendor/bind9/dist-9.6/; revision=244353 svn path=/vendor/bind9/9.6-ESV-R8/; revision=244354; tag=vendor/bind9/9.6-ESV-R8
Diffstat (limited to 'lib/lwres/getaddrinfo.c')
-rw-r--r--lib/lwres/getaddrinfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/lwres/getaddrinfo.c b/lib/lwres/getaddrinfo.c
index 8244bf3b326b..f8b4c81d2c41 100644
--- a/lib/lwres/getaddrinfo.c
+++ b/lib/lwres/getaddrinfo.c
@@ -398,7 +398,7 @@ lwres_getaddrinfo(const char *hostname, const char *servname,
goto inet6_addr;
}
addrsize = sizeof(struct in_addr);
- addroff = (char *)(&SIN(0)->sin_addr) - (char *)0;
+ addroff = offsetof(struct sockaddr_in, sin_addr);
family = AF_INET;
goto common;
#ifdef LWRES_HAVE_SIN6_SCOPE_ID
@@ -408,7 +408,7 @@ lwres_getaddrinfo(const char *hostname, const char *servname,
if (family && family != AF_INET6)
return (EAI_NONAME);
addrsize = sizeof(struct in6_addr);
- addroff = (char *)(&SIN6(0)->sin6_addr) - (char *)0;
+ addroff = offsetof(struct sockaddr_in6, sin6_addr);
family = AF_INET6;
goto common;
#endif
@@ -417,7 +417,7 @@ lwres_getaddrinfo(const char *hostname, const char *servname,
return (EAI_NONAME);
inet6_addr:
addrsize = sizeof(struct in6_addr);
- addroff = (char *)(&SIN6(0)->sin6_addr) - (char *)0;
+ addroff = offsetof(struct sockaddr_in6, sin6_addr);
family = AF_INET6;
common: