From d6db1a583cc495ae318872e298f200ee1da673d9 Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sun, 3 Jul 2022 11:26:01 +0300 Subject: SFTP: compatibility with older libssh versions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mavridis Philippe Signed-off-by: Slávek Banko --- tdeioslave/sftp/tdeio_sftp.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'tdeioslave/sftp/tdeio_sftp.h') 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; } -- cgit v1.2.1