1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

Fix runtime error (for CARES enabled and IPV6 disabled builds)

- Bump PORTREVISION for package change

Obtained from:	3bfda07004
PR:		245237
Reported by:	Michael Osipov <michael.osipov@siemens.com>
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2020-04-02 12:23:35 +00:00
parent 007185c55d
commit 7d8db11b17
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=530365
2 changed files with 39 additions and 0 deletions

View File

@ -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

View File

@ -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);