]>
Commit | Line | Data |
---|---|---|
be43d6f2 AM |
1 | diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c |
2 | index 97f3af9..72fbdb0 100644 | |
3 | --- a/sysdeps/posix/getaddrinfo.c | |
4 | +++ b/sysdeps/posix/getaddrinfo.c | |
5 | @@ -2108,7 +2108,7 @@ getaddrinfo (const char *name, const char *service, | |
6 | { | |
7 | /* If we haven't seen both IPv4 and IPv6 interfaces we can | |
8 | narrow down the search. */ | |
9 | - if (! seen_ipv4 || ! seen_ipv6) | |
10 | + if ((! seen_ipv4 || ! seen_ipv6) && (seen_ipv4 || seen_ipv6)) | |
11 | { | |
12 | local_hints = *hints; | |
13 | local_hints.ai_family = seen_ipv4 ? PF_INET : PF_INET6; |