summaryrefslogtreecommitdiff
path: root/freefilesync/ffs_libcurl_7.61.1.patch
blob: 08b5eb407a88e40c5cbf5835146a41eeb1407daf (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Author: Brulhart, bgstack15
Date: 2022-08-03
Message: Update curl wrapper to use libcurl 7.61
Version: FreeFileSync 11.23
Message: We have to omit checking for certain definitions.
Distro: AlmaLinux 8. File ffs_curl.patch is different between all distros!
diff -aur 11.23-0/FreeFileSync/Source/afs/ftp.cpp 11.23-1/FreeFileSync/Source/afs/ftp.cpp
--- 11.23-0/FreeFileSync/Source/afs/ftp.cpp	2022-08-03 08:55:32.000000000 -0400
+++ 11.23-1/FreeFileSync/Source/afs/ftp.cpp	2022-08-03 12:45:11.665525916 -0400
@@ -681,7 +681,7 @@
             curlRelPath += compFmt;
         }
 
-        static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 67));
+        static_assert(LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 61));
         /*  1. CURLFTPMETHOD_NOCWD requires absolute paths to unconditionally skip CWDs: https://github.com/curl/curl/pull/4382
             2. CURLFTPMETHOD_SINGLECWD requires absolute paths to skip one needless "CWD entry path": https://github.com/curl/curl/pull/4332
               => https://curl.haxx.se/docs/faq.html#How_do_I_list_the_root_dir_of_an
diff -aur 11.23-0/libcurl/curl_wrap.cpp 11.23-1/libcurl/curl_wrap.cpp
--- 11.23-0/libcurl/curl_wrap.cpp	2022-08-03 08:55:32.000000000 -0400
+++ 11.23-1/libcurl/curl_wrap.cpp	2022-08-03 13:46:10.033651851 -0400
@@ -331,9 +331,9 @@
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE46);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TOO_MANY_REDIRECTS);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNKNOWN_OPTION);
-            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SETOPT_OPTION_SYNTAX);
+            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TELNET_OPTION_SYNTAX);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE50);
-            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE51);
+            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PEER_FAILED_VERIFICATION);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_GOT_NOTHING);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_ENGINE_NOTFOUND);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_ENGINE_SETFAILED);
@@ -342,9 +342,9 @@
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE57);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CERTPROBLEM);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CIPHER);
-            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PEER_FAILED_VERIFICATION);
+            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CACERT);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_BAD_CONTENT_ENCODING);
-            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE62);
+            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_LDAP_INVALID_URL); // < libcurl 7.82.0
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_FILESIZE_EXCEEDED);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_USE_SSL_FAILED);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SEND_FAIL_REWIND);
@@ -358,7 +358,7 @@
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_REMOTE_FILE_EXISTS);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_TFTP_NOSUCHUSER);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_CONV_FAILED);
-            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_OBSOLETE76);
+            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_CONV_REQD); // < libcurl 7.82.0
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CACERT_BADFILE);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_REMOTE_FILE_NOT_FOUND);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSH);
@@ -376,15 +376,7 @@
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_INVALIDCERTSTATUS);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP2_STREAM);
             ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_RECURSIVE_API_CALL);
-            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_AUTH_ERROR);
-            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_HTTP3);
-            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_QUIC_CONNECT_ERROR);
-            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_PROXY);
-            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_SSL_CLIENTCERT);
-            ZEN_CHECK_CASE_FOR_CONSTANT(CURLE_UNRECOVERABLE_POLL);
-            ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST);
     }
-    static_assert(CURL_LAST == CURLE_UNRECOVERABLE_POLL + 1);
 
     return replaceCpy<std::wstring>(L"Curl status %x", L"%x", numberTo<std::wstring>(static_cast<int>(sc)));
 }
diff -aur 11.23-0/libcurl/curl_wrap.h 11.23-1/libcurl/curl_wrap.h
--- 11.23-0/libcurl/curl_wrap.h	2022-08-03 08:48:17.000000000 -0400
+++ 11.23-1/libcurl/curl_wrap.h	2022-08-03 12:44:58.712371236 -0400
@@ -17,10 +17,6 @@
 #include <curl/curl.h>
 //-------------------------------------------------
 
-#ifndef CURLINC_CURL_H
-    #error curl.h header guard changed
-#endif
-
 namespace zen
 {
 void libcurlInit();
bgstack15