[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v3 2/4] rpc: replacing ssh_is_server_known() by ssh_session_is_known_server().



After version 0.8.0, libssh deprecated the function scope
ssh_is_server_known() and moved to ssh_session_is_known_server().
So, libvirt is failing to compile using this new function name.

Signed-off-by: Julio Faracco <jcfaracco gmail com>
---
 src/rpc/virnetlibsshsession.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c
index 7c5f158f4d..eb6d6843a2 100644
--- a/src/rpc/virnetlibsshsession.c
+++ b/src/rpc/virnetlibsshsession.c
@@ -80,6 +80,22 @@ struct _virNetLibsshAuthMethod {
     int tries;
 };
 
+#ifndef HAVE_SSH_KNOWN_HOSTS_E
+/* This is an auxiliar enum to help libssh migration to version 0.8.0
+ * or higher. This enum associates the enumerator ssh_server_known_e
+ * with new ssh_known_hosts_e enum. In other words, it can be removed
+ * in the future. ERROR was moved from -1 to -2 and NOT_FOUND from 4
+ * to -1. */
+enum _vir_ssh_known_hosts_e {
+    SSH_KNOWN_HOSTS_ERROR = SSH_SERVER_ERROR,
+    SSH_KNOWN_HOSTS_UNKNOWN = SSH_SERVER_NOT_KNOWN,
+    SSH_KNOWN_HOSTS_OK,
+    SSH_KNOWN_HOSTS_CHANGED,
+    SSH_KNOWN_HOSTS_OTHER,
+    SSH_KNOWN_HOSTS_NOT_FOUND,
+};
+#endif
+
 struct _virNetLibsshSession {
     virObjectLockable parent;
     virNetLibsshSessionState state;
-- 
2.19.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]