summaryrefslogtreecommitdiff
path: root/freefilesync/debian/patches/libssh2_relax_dep.patch
blob: 3d1249a8098c50817635b899f63412eca489203c (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
Description: Allow one to build with older version of libssh2
 Don't fail on missing constants when building with older versions of libssh2
Author: Fab Stz <fabstz-it@yahoo.fr>
Origin: self
Forwarded: not-needed
Last-Update: 2023-06-20

--- a/libssh2/libssh2_wrap.h
+++ b/libssh2/libssh2_wrap.h
@@ -171,11 +171,17 @@
             ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_ENCRYPT);
             ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_BAD_SOCKET);
             ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KNOWN_HOSTS);
+#if LIBSSH2_VERSION_NUM >= 0x010900 // 1.9.0
             ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_CHANNEL_WINDOW_FULL);
             ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KEYFILE_AUTH_FAILED);
+#endif
+#if LIBSSH2_VERSION_NUM >= 0x010A00 // 1.10.0
             ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_RANDGEN);
+#endif
+#if LIBSSH2_VERSION_NUM >= 0x010B00 // 1.11.0
             ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_MISSING_USERAUTH_BANNER);
             ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_ALGO_UNSUPPORTED);
+#endif
 
         default:
             return replaceCpy<std::wstring>(L"SSH status %x", L"%x", numberTo<std::wstring>(sc));
bgstack15