0001-Fix-build-with-curl-7.62.0.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. From 4e3764ecf2b2c3f62475579fee6af4a753729f07 Mon Sep 17 00:00:00 2001
  2. From: Baruch Siach <baruch@tkos.co.il>
  3. Date: Thu, 1 Nov 2018 19:12:20 +0200
  4. Subject: [PATCH] Fix build with curl 7.62.0
  5. Fixes #134.
  6. curl 7.62.0 deprecates the CURLE_SSL_CACERT error code, and unifies it
  7. with CURLE_PEER_FAILED_VERIFICATION. Adjust the errors list to match.
  8. This fixes the following build failure:
  9. src/lcerr_easy.h: In function 'lcurl_err_easy_mnemo':
  10. src/lcerror.c:32:22: error: duplicate case value
  11. #define ERR_ENTRY(E) case CURLE_##E: return #E;
  12. ^
  13. src/lcerr_easy.h:74:1: note: in expansion of macro 'ERR_ENTRY'
  14. ERR_ENTRY ( SSL_CACERT )
  15. ^~~~~~~~~
  16. src/lcerror.c:32:22: note: previously used here
  17. #define ERR_ENTRY(E) case CURLE_##E: return #E;
  18. ^
  19. src/lcerr_easy.h:65:1: note: in expansion of macro 'ERR_ENTRY'
  20. ERR_ENTRY ( PEER_FAILED_VERIFICATION )
  21. ^~~~~~~~~
  22. Signed-off-by: Baruch Siach <baruch@tkos.co.il>
  23. ---
  24. Upstream status: https://github.com/Lua-cURL/Lua-cURLv3/pull/136
  25. diff --git a/src/lcerr_easy.h b/src/lcerr_easy.h
  26. index 94ad143c3bfe..895c6d87d72f 100644
  27. --- a/Lua-cURLv3-0.3.8/src/lcerr_easy.h
  28. +++ b/Lua-cURLv3-0.3.8/src/lcerr_easy.h
  29. @@ -62,7 +62,11 @@ ERR_ENTRY ( UNKNOWN_TELNET_OPTION ) /* User specified an unknown option */
  30. #endif
  31. ERR_ENTRY ( TELNET_OPTION_SYNTAX )
  32. ERR_ENTRY ( OBSOLETE50 )
  33. +#if LCURL_CURL_VER_GE(7,62,0)
  34. +ERR_ENTRY ( OBSOLETE51 )
  35. +#else
  36. ERR_ENTRY ( PEER_FAILED_VERIFICATION )
  37. +#endif
  38. ERR_ENTRY ( GOT_NOTHING )
  39. ERR_ENTRY ( SSL_ENGINE_NOTFOUND )
  40. ERR_ENTRY ( SSL_ENGINE_SETFAILED )
  41. @@ -71,7 +75,11 @@ ERR_ENTRY ( RECV_ERROR )
  42. ERR_ENTRY ( OBSOLETE57 )
  43. ERR_ENTRY ( SSL_CERTPROBLEM )
  44. ERR_ENTRY ( SSL_CIPHER )
  45. +#if LCURL_CURL_VER_GE(7,62,0)
  46. +ERR_ENTRY ( PEER_FAILED_VERIFICATION )
  47. +#else
  48. ERR_ENTRY ( SSL_CACERT )
  49. +#endif
  50. ERR_ENTRY ( BAD_CONTENT_ENCODING )
  51. ERR_ENTRY ( LDAP_INVALID_URL )
  52. ERR_ENTRY ( FILESIZE_EXCEEDED )