summaryrefslogtreecommitdiffstats
path: root/tdeioslave/sftp/tdeio_sftp.h
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2022-07-03 11:26:01 +0300
committerMavridis Philippe <[email protected]>2022-07-15 13:12:22 +0300
commitd6db1a583cc495ae318872e298f200ee1da673d9 (patch)
treec2bceffece0aaa4dca7bdf216f73e0b74169dac8 /tdeioslave/sftp/tdeio_sftp.h
parent7f277bc5e1504110b80bdef6da99d21ba4ea2a8c (diff)
downloadtdebase-d6db1a583cc495ae318872e298f200ee1da673d9.tar.gz
tdebase-d6db1a583cc495ae318872e298f200ee1da673d9.zip
SFTP: compatibility with older libssh versions
Signed-off-by: Mavridis Philippe <[email protected]> Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'tdeioslave/sftp/tdeio_sftp.h')
-rw-r--r--tdeioslave/sftp/tdeio_sftp.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/tdeioslave/sftp/tdeio_sftp.h b/tdeioslave/sftp/tdeio_sftp.h
index 82bbc7a43..8e46d815c 100644
--- a/tdeioslave/sftp/tdeio_sftp.h
+++ b/tdeioslave/sftp/tdeio_sftp.h
@@ -41,6 +41,24 @@
#define MAX_XFER_BUF_SIZE 60 * 1024
#define TDEIO_SFTP_DB 7120
+
+#if LIBSSH_VERSION_INT < SSH_VERSION_INT(0, 7, 90)
+#define TDEIO_SSH_KNOWN_HOSTS_OK SSH_SERVER_KNOWN_OK
+#define TDEIO_SSH_KNOWN_HOSTS_OTHER SSH_SERVER_FOUND_OTHER
+#define TDEIO_SSH_KNOWN_HOSTS_CHANGED SSH_SERVER_KNOWN_CHANGED
+#define TDEIO_SSH_KNOWN_HOSTS_NOT_FOUND SSH_SERVER_FILE_NOT_FOUND
+#define TDEIO_SSH_KNOWN_HOSTS_UNKNOWN SSH_SERVER_NOT_KNOWN
+#define TDEIO_SSH_KNOWN_HOSTS_ERROR SSH_SERVER_ERROR
+
+#else
+#define TDEIO_SSH_KNOWN_HOSTS_OK SSH_KNOWN_HOSTS_OK
+#define TDEIO_SSH_KNOWN_HOSTS_OTHER SSH_KNOWN_HOSTS_OTHER
+#define TDEIO_SSH_KNOWN_HOSTS_CHANGED SSH_KNOWN_HOSTS_CHANGED
+#define TDEIO_SSH_KNOWN_HOSTS_NOT_FOUND SSH_KNOWN_HOSTS_NOT_FOUND
+#define TDEIO_SSH_KNOWN_HOSTS_UNKNOWN SSH_KNOWN_HOSTS_UNKNOWN
+#define TDEIO_SSH_KNOWN_HOSTS_ERROR SSH_KNOWN_HOSTS_ERROR
+#endif
+
namespace TDEIO {
class AuthInfo;
}