diff options
author | André Draszik <adraszik@tycoint.com> | 2017-09-04 10:42:44 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-05 15:01:01 +0100 |
commit | 21d81abfa13e5d422ce36f90cc5ac5bcf0a91e47 (patch) | |
tree | 2e02261cacdbb69899432fb42f9f6e4f55a9853c /meta/recipes-support/curl | |
parent | c69722616840be627981ebc7e77c986c246d9f8d (diff) | |
download | poky-21d81abfa13e5d422ce36f90cc5ac5bcf0a91e47.tar.gz |
curl: enable threaded resolver
Multi-threaded applications using libcurl crash
on DNS timeouts when built using OE.
The reason is as follows:
By default, libcurl implements DNS timeouts using a
timer (alarm()) and a pair of setjmp()/longjmp().
This approach is unsafe in multi-threaded applications
for various reasons, as e.g. explained in the relevant
man-pages.
To avoid this, libcurl can be compiled with a built-in
threaded resolver, or against the c-ares asynchronous
resolver library.
To keep extra dependencies to a minimum, and to mimic
other distributions (debian at least), and because
c-ares is not available in OE-core, add a PACKAGECONFIG
to be able to enable use of of the built-in threaded
resolver and enable it by default.
(From OE-Core rev: 41f1e44fce976c4140cda62a41349e91e69d04ef)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/curl')
-rw-r--r-- | meta/recipes-support/curl/curl_7.54.1.bb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/meta/recipes-support/curl/curl_7.54.1.bb b/meta/recipes-support/curl/curl_7.54.1.bb index f42582a9f0..5c8072fc65 100644 --- a/meta/recipes-support/curl/curl_7.54.1.bb +++ b/meta/recipes-support/curl/curl_7.54.1.bb | |||
@@ -20,9 +20,9 @@ SRC_URI[sha256sum] = "fdfc4df2d001ee0c44ec071186e770046249263c491fcae48df0e1a3ca | |||
20 | CVE_PRODUCT = "libcurl" | 20 | CVE_PRODUCT = "libcurl" |
21 | inherit autotools pkgconfig binconfig multilib_header | 21 | inherit autotools pkgconfig binconfig multilib_header |
22 | 22 | ||
23 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls proxy zlib" | 23 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} gnutls proxy threaded-resolver zlib" |
24 | PACKAGECONFIG_class-native = "ipv6 proxy ssl zlib" | 24 | PACKAGECONFIG_class-native = "ipv6 proxy ssl threaded-resolver zlib" |
25 | PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl zlib" | 25 | PACKAGECONFIG_class-nativesdk = "ipv6 proxy ssl threaded-resolver zlib" |
26 | 26 | ||
27 | PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," | 27 | PACKAGECONFIG[dict] = "--enable-dict,--disable-dict," |
28 | PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" | 28 | PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls" |
@@ -42,6 +42,7 @@ PACKAGECONFIG[smtp] = "--enable-smtp,--disable-smtp," | |||
42 | PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl" | 42 | PACKAGECONFIG[ssl] = "--with-ssl --with-random=/dev/urandom,--without-ssl,openssl" |
43 | PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," | 43 | PACKAGECONFIG[telnet] = "--enable-telnet,--disable-telnet," |
44 | PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," | 44 | PACKAGECONFIG[tftp] = "--enable-tftp,--disable-tftp," |
45 | PACKAGECONFIG[threaded-resolver] = "--enable-threaded-resolver,--disable-threaded-resolver" | ||
45 | PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" | 46 | PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_LIBDIR}/../,--without-zlib,zlib" |
46 | PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" | 47 | PACKAGECONFIG[krb5] = "--with-gssapi,--without-gssapi,krb5" |
47 | 48 | ||