Merge pull request #288071 from wegank/freefilesync-curl

freefilesync: fix build with curl 8.6.0
This commit is contained in:
Weijia Wang 2024-02-13 22:08:54 +01:00 committed by GitHub
commit cc2cfef672
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,16 @@
diff --git a/libcurl/curl_wrap.cpp b/libcurl/curl_wrap.cpp
index 11ac9dd..93edd44 100644
--- a/libcurl/curl_wrap.cpp
+++ b/libcurl/curl_wrap.cpp
@@ -401,9 +401,10 @@ std::wstring zen::formatCurlStatusCode(CURLcode sc)
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(CURLE_TOO_LARGE);
ZEN_CHECK_CASE_FOR_CONSTANT(CURL_LAST);
}
- static_assert(CURL_LAST == CURLE_UNRECOVERABLE_POLL + 1);
+ static_assert(CURL_LAST == CURLE_TOO_LARGE + 1);
return replaceCpy<std::wstring>(L"Curl status %x", L"%x", numberTo<std::wstring>(static_cast<int>(sc)));
}

View File

@ -72,6 +72,8 @@ stdenv.mkDerivation (finalAttrs: {
patch = "ffs_no_check_updates.patch";
hash = "sha256-lPyHpxhZz8BSnDI8QfAzKpKwVkp2jiF49RWjKNuZGII=";
})
# Fix build with curl 8.6.0
./curl-8.6.0.patch
];
nativeBuildInputs = [