From 6966bc1a12a57f2586221642007706c12412ecc3 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 7 Aug 2018 18:41:04 +0200 Subject: [PATCH] Fixed: Compilation with older CURL --HG-- branch : develop --- code/nel/src/gui/curl_certificates.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/nel/src/gui/curl_certificates.cpp b/code/nel/src/gui/curl_certificates.cpp index 552ed2a9f..14a1c3f0a 100644 --- a/code/nel/src/gui/curl_certificates.cpp +++ b/code/nel/src/gui/curl_certificates.cpp @@ -69,7 +69,16 @@ namespace NLGUI // get more information on CURL session curl_tlssessioninfo *sessionInfo; - CURLcode res = curl_easy_getinfo(curl, CURLINFO_TLS_SSL_PTR, &sessionInfo); + + CURLINFO info; + +#if CURL_AT_LEAST_VERSION(7, 48, 0) + info = CURLINFO_TLS_SSL_PTR; +#else + info = CURLINFO_TLS_SESSION; +#endif + + CURLcode res = curl_easy_getinfo(curl, info, &sessionInfo); // only use OpenSSL callback if not using Windows SSPI and using OpenSSL backend if (!res && sessionInfo && sessionInfo->backend == CURLSSLBACKEND_OPENSSL && !(data && data->features & CURL_VERSION_SSPI))