From: Brian Prodoehl Date: Fri, 15 Jul 2016 15:53:13 +0000 (-0400) Subject: curl_global_init: Check if IPv6 works X-Git-Tag: curl-7_50_0~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c50980807c5;p=thirdparty%2Fcurl.git curl_global_init: Check if IPv6 works - Curl_ipv6works() is not thread-safe until after the first call, so call it once during global init to avoid a possible race condition. Bug: https://github.com/curl/curl/issues/915 PR: https://github.com/curl/curl/pull/918 --- diff --git a/lib/easy.c b/lib/easy.c index 91c1382f8e..dc7139f232 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -271,6 +271,8 @@ static CURLcode global_init(long flags, bool memoryfuncs) return CURLE_FAILED_INIT; } + (void)Curl_ipv6works(); + #if defined(USE_LIBSSH2) && defined(HAVE_LIBSSH2_INIT) if(libssh2_init(0)) { DEBUGF(fprintf(stderr, "Error: libssh2_init failed\n"));