From 67a08dca27a6a07b36c7f97252e284ca957ff1a5 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Tue, 26 Nov 2019 15:06:31 +0100 Subject: curl_setup: disable IPv6 resolver without `getaddrinfo` Also, use `CURLRES_IPV6` only for actual DNS resolution, not for IPv6 address support. This makes it possible to connect to IPv6 literals by setting `ENABLE_IPV6` even without `getaddrinfo` support. It also fixes the CMake build when using the synchronous resolver without `getaddrinfo` support. Closes https://github.com/curl/curl/pull/4662 --- tests/server/resolve.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/server/resolve.c') diff --git a/tests/server/resolve.c b/tests/server/resolve.c index 4cbdba6ec..993e03125 100644 --- a/tests/server/resolve.c +++ b/tests/server/resolve.c @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) while(argc>arg) { if(!strcmp("--version", argv[arg])) { printf("resolve IPv4%s\n", -#ifdef ENABLE_IPV6 +#if defined(CURLRES_IPV6) "/IPv6" #else "" @@ -95,7 +95,7 @@ int main(int argc, char *argv[]) puts("Usage: resolve [option] \n" " --version\n" " --ipv4" -#ifdef ENABLE_IPV6 +#if defined(CURLRES_IPV6) "\n --ipv6" #endif ); @@ -107,7 +107,7 @@ int main(int argc, char *argv[]) atexit(win32_cleanup); #endif -#ifdef ENABLE_IPV6 +#if defined(CURLRES_IPV6) if(use_ipv6) { /* Check that the system has IPv6 enabled before checking the resolver */ curl_socket_t s = socket(PF_INET6, SOCK_DGRAM, 0); -- cgit v1.2.3