diff mbox

libcurl: use c-ares if available

Message ID de47ffa2f80c24f58f017282718c43b5d0dbc79e.1430563714.git.john@keeping.me.uk
State Accepted
Headers show

Commit Message

John Keeping May 2, 2015, 10:58 a.m. UTC
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.

Signed-off-by: John Keeping <john@keeping.me.uk>
---
 package/libcurl/libcurl.mk | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Peter Korsgaard May 3, 2015, 5:25 p.m. UTC | #1
>>>>> "John" == John Keeping <john@keeping.me.uk> writes:

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

 > Signed-off-by: John Keeping <john@keeping.me.uk>

> ---
 >  package/libcurl/libcurl.mk | 5 +++++
 >  1 file changed, 5 insertions(+)

 > diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
 > index 014c5e3..825c844 100644
 > --- a/package/libcurl/libcurl.mk
 > +++ b/package/libcurl/libcurl.mk
 > @@ -46,6 +46,11 @@ 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
 > +endif

We prefer to be explicit about these dependencies, so I've added a
--disable-ares in the else clause and committed, thanks.
diff mbox

Patch

diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk
index 014c5e3..825c844 100644
--- a/package/libcurl/libcurl.mk
+++ b/package/libcurl/libcurl.mk
@@ -46,6 +46,11 @@  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
+endif
+
 # Configure curl to support libssh2
 ifeq ($(BR2_PACKAGE_LIBSSH2),y)
 LIBCURL_DEPENDENCIES += libssh2