From b2b3b79d689a58c471811fc4fcad0e82adbfc21c Mon Sep 17 00:00:00 2001 From: Otto Date: Fri, 5 Mar 2021 13:36:28 +0100 Subject: [PATCH] make CURLOPT_TCP_FASTOPEN conditional on availability --- pdns/minicurl.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); } -- 2.47.2