From 7d8db11b174316c51dabf855fb6d114f0996a5d7 Mon Sep 17 00:00:00 2001 From: Sunpoet Po-Chuan Hsieh Date: Thu, 2 Apr 2020 12:23:35 +0000 Subject: [PATCH] Fix runtime error (for CARES enabled and IPV6 disabled builds) - Bump PORTREVISION for package change Obtained from: https://github.com/curl/curl/commit/3bfda07004a5739fb306e55cb9529ba3de35fbdb PR: 245237 Reported by: Michael Osipov --- ftp/curl/Makefile | 1 + ftp/curl/files/patch-lib-easy.c | 38 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 ftp/curl/files/patch-lib-easy.c diff --git a/ftp/curl/Makefile b/ftp/curl/Makefile index c14bd200a9a1..e3451377ad69 100644 --- a/ftp/curl/Makefile +++ b/ftp/curl/Makefile @@ -3,6 +3,7 @@ PORTNAME= curl PORTVERSION= 7.69.1 +PORTREVISION= 1 CATEGORIES= ftp net www MASTER_SITES= https://curl.haxx.se/download/ \ LOCAL/sunpoet diff --git a/ftp/curl/files/patch-lib-easy.c b/ftp/curl/files/patch-lib-easy.c new file mode 100644 index 000000000000..683d5c90ff73 --- /dev/null +++ b/ftp/curl/files/patch-lib-easy.c @@ -0,0 +1,38 @@ +Obtained from: https://github.com/curl/curl/commit/3bfda07004a5739fb306e55cb9529ba3de35fbdb + +--- lib/easy.c.orig 2020-03-09 15:31:01 UTC ++++ lib/easy.c +@@ -884,14 +884,25 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy + goto fail; + + #ifdef USE_ARES +- if(Curl_set_dns_servers(outcurl, data->set.str[STRING_DNS_SERVERS])) +- goto fail; +- if(Curl_set_dns_interface(outcurl, data->set.str[STRING_DNS_INTERFACE])) +- goto fail; +- if(Curl_set_dns_local_ip4(outcurl, data->set.str[STRING_DNS_LOCAL_IP4])) +- goto fail; +- if(Curl_set_dns_local_ip6(outcurl, data->set.str[STRING_DNS_LOCAL_IP6])) +- goto fail; ++ { ++ CURLcode rc; ++ ++ rc = Curl_set_dns_servers(outcurl, data->set.str[STRING_DNS_SERVERS]); ++ if(rc && rc != CURLE_NOT_BUILT_IN) ++ goto fail; ++ ++ rc = Curl_set_dns_interface(outcurl, data->set.str[STRING_DNS_INTERFACE]); ++ if(rc && rc != CURLE_NOT_BUILT_IN) ++ goto fail; ++ ++ rc = Curl_set_dns_local_ip4(outcurl, data->set.str[STRING_DNS_LOCAL_IP4]); ++ if(rc && rc != CURLE_NOT_BUILT_IN) ++ goto fail; ++ ++ rc = Curl_set_dns_local_ip6(outcurl, data->set.str[STRING_DNS_LOCAL_IP6]); ++ if(rc && rc != CURLE_NOT_BUILT_IN) ++ goto fail; ++ } + #endif /* USE_ARES */ + + Curl_convert_setup(outcurl);