about summary refs log tree commit diff
path: root/src/libstore/download.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2016-10-13T15·25+0200
committerEelco Dolstra <edolstra@gmail.com>2016-10-13T15·25+0200
commit5e61b422c58baac26b232233d39f5814cc35d52a (patch)
treef9403fb67507e235bda4b541e8792f35ea96580c /src/libstore/download.cc
parentfb2dd3210072a03526e881cd2547cf4c2df4ba52 (diff)
Fix HTTP/2 support
Commit 86e8c67efc33cf756500a1dec7fd6313658f2664 broke it, because
CURL_* are not actually #defines.
Diffstat (limited to 'src/libstore/download.cc')
-rw-r--r--src/libstore/download.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index 337ebc9bfebf..2229e291eab2 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -188,10 +188,10 @@ struct CurlDownloader : public Downloader
             curl_easy_setopt(req, CURLOPT_FOLLOWLOCATION, 1L);
             curl_easy_setopt(req, CURLOPT_NOSIGNAL, 1);
             curl_easy_setopt(req, CURLOPT_USERAGENT, ("Nix/" + nixVersion).c_str());
-            #ifdef CURLOPT_PIPEWAIT
+            #if CURL_AT_LEAST_VERSION(7, 43, 0)
             curl_easy_setopt(req, CURLOPT_PIPEWAIT, 1);
             #endif
-            #ifdef CURL_HTTP_VERSION_2TLS
+            #if CURL_AT_LEAST_VERSION(7, 47, 0)
             if (downloader.enableHttp2)
                 curl_easy_setopt(req, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_2TLS);
             #endif
@@ -303,7 +303,7 @@ struct CurlDownloader : public Downloader
 
         curlm = curl_multi_init();
 
-        #ifdef CURLPIPE_MULTIPLEX
+        #if CURL_AT_LEAST_VERSION(7, 43, 0) // correct?
         curl_multi_setopt(curlm, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
         #endif
         curl_multi_setopt(curlm, CURLMOPT_MAX_TOTAL_CONNECTIONS,