libcurl: fix build without threads
PATCH 1/1 libcurl: fix build without threads
When c-ares is not enabled libcurl enables the threaded DNS resolver by default. Make sure the threaded resolvers is disabled when the toolchain does not support threads.
Add upstream patch that fixes the configure option for disabling the threaded resolver.
Fixes:
http://autobuild.buildroot.net/results/39f/39fa63fb2ecb75e4b2521d1ee3dfa357c4e5c594/
http://autobuild.buildroot.net/results/dfd/dfd296086d0d6bed73b92fe2fa4ba5434dddf796/
--- ...confopts.m4-fix-disable-threaded-resolver.patch | 40 ++++++++++++++++++++++ package/libcurl/libcurl.mk | 8 +++++ 2 files changed, 48 insertions(+) create mode 100644 package/libcurl/0001-curl-confopts.m4-fix-disable-threaded-resolver.patch
package/libcurl/0001-curl-confopts.m4-fix-disable-threaded-resolver.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 3cb4bb6b5fb8a936cb69e2e9ea6a4e692122abb9 Mon Sep 17 00:00:00 2001 +From: Jakub Zakrzewski <[email protected]> +Date: Tue, 15 Aug 2017 13:21:33 -0400 +Subject: [PATCH] curl-confopts.m4: fix --disable-threaded-resolver + +Closes https://github.com/curl/curl/issues/1784 + +Signed-off-by: Baruch Siach <[email protected]> +--- +Upstream status: commit 3cb4bb6b5fb + + m4/curl-confopts.m4 | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4 +index d77a884d58bd..6dcd0f1a6794 100644 +--- a/m4/curl-confopts.m4 ++++ b/m4/curl-confopts.m4 +@@ -37,14 +37,14 @@ AC_HELP_STRING([--enable-threaded-resolver],[Enable threaded resolver]) + AC_HELP_STRING([--disable-threaded-resolver],[Disable threaded resolver]), + OPT_THRES=$enableval) + case "$OPT_THRES" in +- *) +- dnl configure option not specified +- want_thres="yes" +- ;; + no) + dnl --disable-threaded-resolver option used + want_thres="no" + ;; ++ *) ++ dnl configure option not specified ++ want_thres="yes" ++ ;; + esac + AC_MSG_RESULT([$want_thres]) + ]) +-- +2.14.1 +
package/libcurl/libcurl.mk +8 -0
@@ -14,6 +14,8 @@ LIBCURL_DEPENDENCIES = host-pkgconf \ LIBCURL_LICENSE = curl LIBCURL_LICENSE_FILES = COPYING LIBCURL_INSTALL_STAGING = YES +# Patching m4/curl-confopts.m4 +LIBCURL_AUTORECONF = YES # We disable NTLM support because it uses fork(), which doesn't work # on non-MMU platforms. Moreover, this authentication method is
@@ -22,6 +24,12 @@ LIBCURL_INSTALL_STAGING = YES LIBCURL_CONF_OPTS = --disable-manual --disable-ntlm-wb \ --enable-hidden-symbols --with-random=/dev/urandom --disable-curldebug +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +LIBCURL_CONF_OPTS += --enable-threaded-resolver +else +LIBCURL_CONF_OPTS += --disable-threaded-resolver +endif + ifeq ($(BR2_PACKAGE_LIBCURL_VERBOSE),y) LIBCURL_CONF_OPTS += --enable-verbose else
Signature · 1 line
2.14.1
PATCH 1/1 libcurl: fix build without threads
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Baruch" == Baruch Siach <[email protected]> writes:
When c-ares is not enabled libcurl enables the threaded DNS resolver by default. Make sure the threaded resolvers is disabled when the toolchain does not support threads.
Quoted 8 lines
Add upstream patch that fixes the configure option for disabling the threaded resolver.
Fixes:
http://autobuild.buildroot.net/results/39f/39fa63fb2ecb75e4b2521d1ee3dfa357c4e5c594/
http://autobuild.buildroot.net/results/dfd/dfd296086d0d6bed73b92fe2fa4ba5434dddf796/Signed-off-by Baruch Siach <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/1 libcurl: fix build without threads
In reply to Baruch SiachQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Baruch" == Baruch Siach <[email protected]> writes:
When c-ares is not enabled libcurl enables the threaded DNS resolver by default. Make sure the threaded resolvers is disabled when the toolchain does not support threads.
Quoted 8 lines
Add upstream patch that fixes the configure option for disabling the threaded resolver.
Fixes:
http://autobuild.buildroot.net/results/39f/39fa63fb2ecb75e4b2521d1ee3dfa357c4e5c594/
http://autobuild.buildroot.net/results/dfd/dfd296086d0d6bed73b92fe2fa4ba5434dddf796/Signed-off-by Baruch Siach <[email protected]>
Committed to 2017.08.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard