1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-30 10:38:37 +00:00

Fix build with curl 7.62.0

This commit is contained in:
Sunpoet Po-Chuan Hsieh 2018-11-03 22:53:27 +00:00
parent 45b0a0268c
commit 57e9b58a33
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=483950

View File

@ -0,0 +1,27 @@
--- cpr/error.cpp.orig 2017-11-01 21:56:02 UTC
+++ cpr/error.cpp
@@ -22,8 +22,10 @@ ErrorCode Error::getErrorCodeForCurlErro
return ErrorCode::OPERATION_TIMEDOUT;
case CURLE_SSL_CONNECT_ERROR:
return ErrorCode::SSL_CONNECT_ERROR;
+#if LIBCURL_VERSION_NUM < 0x073e00
case CURLE_PEER_FAILED_VERIFICATION:
return ErrorCode::SSL_REMOTE_CERTIFICATE_ERROR;
+#endif
case CURLE_GOT_NOTHING:
return ErrorCode::EMPTY_RESPONSE;
case CURLE_SSL_ENGINE_NOTFOUND:
@@ -38,8 +40,13 @@ ErrorCode Error::getErrorCodeForCurlErro
return ErrorCode::SSL_LOCAL_CERTIFICATE_ERROR;
case CURLE_SSL_CIPHER:
return ErrorCode::GENERIC_SSL_ERROR;
+#if LIBCURL_VERSION_NUM >= 0x073e00
+ case CURLE_PEER_FAILED_VERIFICATION:
+ return ErrorCode::SSL_REMOTE_CERTIFICATE_ERROR;
+#else
case CURLE_SSL_CACERT:
return ErrorCode::SSL_CACERT_ERROR;
+#endif
case CURLE_USE_SSL_FAILED:
return ErrorCode::GENERIC_SSL_ERROR;
case CURLE_SSL_ENGINE_INITFAILED: