Skip to content
Snippets Groups Projects
Commit 02da15f7 authored by Vladimir Davydov's avatar Vladimir Davydov
Browse files

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.
parent 74e20755
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment