httpc: fix compilation with libcurl >= 7.62.0
Starting from libcurl 7.62.0, CURL_SSL_CACERT is defined as a macro alias to CURLE_PEER_FAILED_VERIFICATION, see https://github.com/curl/curl/commit/3f3b26d6feb0667714902e836af608094235fca2 This breaks compilation: httpc.c:337:7: error: duplicate case value 'CURLE_PEER_FAILED_VERIFICATION' case CURLE_PEER_FAILED_VERIFICATION: ^ httpc.c:336:7: note: previous case defined here case CURLE_SSL_CACERT: ^ curl.h:589:26: note: expanded from macro 'CURLE_SSL_CACERT' #define CURLE_SSL_CACERT CURLE_PEER_FAILED_VERIFICATION ^ Fix this by using CURLE_SSL_CACERT only if libcurl version is less than 7.62.0. Note, we can't use CURL_AT_LEAST_VERSION to check libcurl version, because it isn't available in libcurl shipped with CentOS 6.
Loading
Please register or sign in to comment