]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
make CURLOPT_TCP_FASTOPEN conditional on availability 10149/head
authorOtto <otto.moerbeek@open-xchange.com>
Fri, 5 Mar 2021 12:36:28 +0000 (13:36 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Fri, 5 Mar 2021 14:01:49 +0000 (15:01 +0100)
pdns/minicurl.cc

index fff3636ff3f7ba6195807d185a60a6f6f6cfacbc..b38413d47a375dd9fc0157a3fcaf2cc56ee59b97 100644 (file)
@@ -112,8 +112,11 @@ void MiniCurl::setupURL(const std::string& str, const ComboAddress* rem, const C
   curl_easy_setopt(d_curl, CURLOPT_WRITEFUNCTION, write_callback);
   curl_easy_setopt(d_curl, CURLOPT_WRITEDATA, this);
   curl_easy_setopt(d_curl, CURLOPT_TIMEOUT, static_cast<long>(timeout));
+#if defined(CURL_AT_LEAST_VERSION)
+#if CURL_AT_LEAST_VERSION(7, 49, 0) && defined(__linux__)
   curl_easy_setopt(d_curl, CURLOPT_TCP_FASTOPEN, fastopen);
-
+#endif
+#endif
   clearHeaders();
   d_data.clear();
 }