[Buildroot] [git commit] libcurl: use c-ares if available

Peter Korsgaard peter at korsgaard.com
Sun May 3 17:25:24 UTC 2015


commit: http://git.buildroot.net/buildroot/commit/?id=ff05e241f877615c127477dcda2ba99667a8d798
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

By default libcurl uses the C library's DNS resolver which is
synchronous, even if an application is using libcurl's non-blocking mode
of operation.

Configure libcurl to use c-ares if it is selected so that it can resolve
addresses asynchronously if required.

[Peter: explicitly disable c-ares support if not enabled]
Signed-off-by: John Keeping <john at keeping.me.uk>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/libcurl/libcurl.mk |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
index f0d7bac..0ce2dfd 100644
--- a/package/libcurl/libcurl.mk
+++ b/package/libcurl/libcurl.mk
@@ -46,6 +46,13 @@ LIBCURL_CONF_OPTS += --without-ssl --without-gnutls \
 	--without-polarssl --without-nss
 endif
 
+ifeq ($(BR2_PACKAGE_C_ARES),y)
+LIBCURL_DEPENDENCIES += c-ares
+LIBCURL_CONF_OPTS += --enable-ares
+else
+LIBCURL_CONF_OPTS += --disable-ares
+endif
+
 # Configure curl to support libssh2
 ifeq ($(BR2_PACKAGE_LIBSSH2),y)
 LIBCURL_DEPENDENCIES += libssh2


More information about the buildroot mailing list