From: Otto Date: Fri, 5 Mar 2021 12:36:28 +0000 (+0100) Subject: make CURLOPT_TCP_FASTOPEN conditional on availability X-Git-Tag: rec-4.5.0-alpha3~2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b2b3b79d689a58c471811fc4fcad0e82adbfc21c;p=thirdparty%2Fpdns.git make CURLOPT_TCP_FASTOPEN conditional on availability --- diff --git a/pdns/minicurl.cc b/pdns/minicurl.cc index fff3636ff3..b38413d47a 100644 --- a/pdns/minicurl.cc +++ b/pdns/minicurl.cc @@ -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(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(); }