aboutsummaryrefslogtreecommitdiffstats
path: root/main/lua-curl/fix-build-with-curl-7.62.0.patch
blob: fbd129bdabc77f835d9da82191d16b36058088ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Fix build with curl 7.62.0

curl 7.62.0 deprecates the CURLE_SSL_CACERT error code, and unifies it
with CURLE_PEER_FAILED_VERIFICATION. Adjust the errors list to match.

This fixes the following build failure:

src/lcerr_easy.h: In function 'lcurl_err_easy_mnemo':
src/lcerror.c:32:22: error: duplicate case value
 #define ERR_ENTRY(E) case CURLE_##E: return #E;
                      ^
src/lcerr_easy.h:74:1: note: in expansion of macro 'ERR_ENTRY'
 ERR_ENTRY ( SSL_CACERT               )
 ^~~~~~~~~
src/lcerror.c:32:22: note: previously used here
 #define ERR_ENTRY(E) case CURLE_##E: return #E;
                      ^
src/lcerr_easy.h:65:1: note: in expansion of macro 'ERR_ENTRY'
 ERR_ENTRY ( PEER_FAILED_VERIFICATION )
 ^~~~~~~~~
---
 src/lcerr_easy.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/lcerr_easy.h b/src/lcerr_easy.h
index 94ad143..895c6d8 100644
--- a/src/lcerr_easy.h
+++ b/src/lcerr_easy.h
@@ -62,7 +62,11 @@ ERR_ENTRY ( UNKNOWN_TELNET_OPTION    ) /* User specified an unknown option */
 #endif
 ERR_ENTRY ( TELNET_OPTION_SYNTAX     )
 ERR_ENTRY ( OBSOLETE50               )
+#if LCURL_CURL_VER_GE(7,62,0)
+ERR_ENTRY ( OBSOLETE51               )
+#else
 ERR_ENTRY ( PEER_FAILED_VERIFICATION )
+#endif
 ERR_ENTRY ( GOT_NOTHING              )
 ERR_ENTRY ( SSL_ENGINE_NOTFOUND      )
 ERR_ENTRY ( SSL_ENGINE_SETFAILED     )
@@ -71,7 +75,11 @@ ERR_ENTRY ( RECV_ERROR               )
 ERR_ENTRY ( OBSOLETE57               )
 ERR_ENTRY ( SSL_CERTPROBLEM          )
 ERR_ENTRY ( SSL_CIPHER               )
+#if LCURL_CURL_VER_GE(7,62,0)
+ERR_ENTRY ( PEER_FAILED_VERIFICATION )
+#else
 ERR_ENTRY ( SSL_CACERT               )
+#endif
 ERR_ENTRY ( BAD_CONTENT_ENCODING     )
 ERR_ENTRY ( LDAP_INVALID_URL         )
 ERR_ENTRY ( FILESIZE_EXCEEDED        )
-- 
2.19.2