diff options
| author | Stig Venaas <venaas@php.net> | 2002-08-17 13:56:39 +0000 |
|---|---|---|
| committer | Stig Venaas <venaas@php.net> | 2002-08-17 13:56:39 +0000 |
| commit | fcc0380588b76f4b7d1d3931b688bfe065a1e0a2 (patch) | |
| tree | 9aea564df0cb805f7fbdeb910584eaded9ea5ea7 /main | |
| parent | 20693c1ad4c37931cdb403ec700b8b918f51b090 (diff) | |
| download | php-git-fcc0380588b76f4b7d1d3931b688bfe065a1e0a2.tar.gz | |
Added --enable-ipv6 and only look up AAAA in DNS when enabled
Diffstat (limited to 'main')
| -rw-r--r-- | main/network.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/network.c b/main/network.c index a4bd9b4e42..3fe7e9a152 100644 --- a/main/network.c +++ b/main/network.c @@ -157,7 +157,11 @@ static int php_network_getaddresses(const char *host, struct sockaddr ***sal) struct addrinfo hints, *res, *sai; memset(&hints, '\0', sizeof(hints)); +# ifdef HAVE_IPV6 hints.ai_family = AF_UNSPEC; +# else + hints.ai_family = AF_INET; +# endif if ((n = getaddrinfo(host, NULL, &hints, &res))) { php_error(E_WARNING, "php_network_getaddresses: getaddrinfo failed: %s", PHP_GAI_STRERROR(n)); return 0; |
