Fix for builds with system libcurl < 7.30

CentOS 7.4 and RHEL 7.4 ship with libcurl-devel-7.29.0-42.el7.x86_64; this flag
was added in 7.30.0
https://curl.haxx.se/libcurl/c/CURLMOPT_MAX_TOTAL_CONNECTIONS.html
This commit is contained in:
Benjamin Hipple 2017-12-09 20:02:21 -05:00
parent 0b59882fe3
commit d76c4fe770

View file

@ -369,11 +369,13 @@ struct CurlDownloader : public Downloader
curlm = curl_multi_init(); curlm = curl_multi_init();
#if LIBCURL_VERSION_NUM >= 0x072b00 // correct? #if LIBCURL_VERSION_NUM >= 0x072b00 // Multiplex requires >= 7.43.0
curl_multi_setopt(curlm, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX); curl_multi_setopt(curlm, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
#endif #endif
#if LIBCURL_VERSION_NUM >= 0x071e00 // Max connections requires >= 7.30.0
curl_multi_setopt(curlm, CURLMOPT_MAX_TOTAL_CONNECTIONS, curl_multi_setopt(curlm, CURLMOPT_MAX_TOTAL_CONNECTIONS,
settings.binaryCachesParallelConnections.get()); settings.binaryCachesParallelConnections.get());
#endif
enableHttp2 = settings.enableHttp2; enableHttp2 = settings.enableHttp2;