diff --git a/CMakeLists.txt b/CMakeLists.txt index eeb7c03b..17d37636 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,8 @@ set_package_properties(ENCHANT PROPERTIES PURPOSE "Spell checking support via Enchant" ) -find_package(CURL) +# v7.43.0+ required for CURL_AT_LEAST_VERSION() macro +find_package(CURL 7.43.0) set_package_properties(CURL PROPERTIES DESCRIPTION "Command line tool and library for transferring data with URLs" URL "https://curl.se/" diff --git a/kioslave/http/http.cpp b/kioslave/http/http.cpp index 63d7fdfb..3c56a6f6 100644 --- a/kioslave/http/http.cpp +++ b/kioslave/http/http.cpp @@ -39,8 +39,7 @@ static inline curl_proxytype curlProxyType(const QString &proxy) { const QString proxyprotocol = KUrl(proxy).protocol(); - // added in 7.52.0 -#ifdef CURLPROXY_HTTPS +#if CURL_AT_LEAST_VERSION(7, 52, 0) if (proxyprotocol.startsWith(QLatin1String("https"))) { return CURLPROXY_HTTPS; } @@ -79,7 +78,9 @@ static inline KIO::Error KIOError(const CURLcode curlcode) case CURLE_URL_MALFORMAT: { return KIO::ERR_MALFORMED_URL; } +#if CURL_AT_LEAST_VERSION(7, 73, 0) case CURLE_PROXY: +#endif case CURLE_COULDNT_RESOLVE_PROXY: { return KIO::ERR_UNKNOWN_PROXY_HOST; }