summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
authoritojun <itojun>1999-10-30 05:30:20 +0000
committeritojun <itojun>1999-10-30 05:30:20 +0000
commitfb47cfdaae3394096f1932afacc99d6703d06820 (patch)
tree7d179aef99d1bedac45e1813e3184ce39d27cac7 /missing
parent348b8053083f401389c310f78ad0ea0767e2c88a (diff)
downloadtcpdump-fb47cfdaae3394096f1932afacc99d6703d06820.tar.gz
fix complation on IPv4 host (tested with plain FreeBSD228).
Diffstat (limited to 'missing')
-rw-r--r--missing/getaddrinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/missing/getaddrinfo.c b/missing/getaddrinfo.c
index d57c308d..9da09cbb 100644
--- a/missing/getaddrinfo.c
+++ b/missing/getaddrinfo.c
@@ -562,12 +562,14 @@ explore_fqdn(pai, hostname, servname, res)
for (i = 0; hp->h_addr_list[i] != NULL; i++) {
af = hp->h_addrtype;
ap = hp->h_addr_list[i];
+#ifdef INET6
if (af == AF_INET6
&& IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) {
af = AF_INET;
ap = ap + sizeof(struct in6_addr)
- sizeof(struct in_addr);
}
+#endif
if (af != pai->ai_family)
continue;