about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorBenjamin Hipple <bhipple@protonmail.com>2017-12-10T01·02-0500
committerBenjamin Hipple <bhipple@protonmail.com>2017-12-10T01·02-0500
commitd76c4fe77080a924dd870e5c5a370a4e4a30d0d4 (patch)
tree80838087edc74da2d763bfdf6458912e62f2291a /src/libstore
parent0b59882fe33d375019f9f6f760144151c2a5aa4b (diff)
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
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/download.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index da31029b4f87..4474dfd4b968 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -369,11 +369,13 @@ struct CurlDownloader : public Downloader
 
         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);
         #endif
+        #if LIBCURL_VERSION_NUM >= 0x071e00 // Max connections requires >= 7.30.0
         curl_multi_setopt(curlm, CURLMOPT_MAX_TOTAL_CONNECTIONS,
             settings.binaryCachesParallelConnections.get());
+        #endif
 
         enableHttp2 = settings.enableHttp2;