summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2019-11-26 15:06:31 +0100
committerMarcel Raad <Marcel.Raad@teamviewer.com>2019-12-03 21:37:33 +0100
commit67a08dca27a6a07b36c7f97252e284ca957ff1a5 (patch)
tree0c7d64fa489631d4057904ce0482fd86ab56dca7 /tests
parentab712afa8fb9d2bf7850aa8d031937ca515efa01 (diff)
downloadcurl-67a08dca27a6a07b36c7f97252e284ca957ff1a5.tar.gz
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
Diffstat (limited to 'tests')
-rw-r--r--tests/server/resolve.c6
1 files changed, 3 insertions, 3 deletions
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] <host>\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);