[libvirt] [PATCH v3 0/2] rpc: fixing compilation error due to deprecated ssh_get_publickey().

Julio Faracco jcfaracco at gmail.com
Thu May 10 20:38:55 UTC 2018


After 0.7.5 release, libssh deprecated ssh_get_publickey() method to
introduce ssh_get_server_publickey(). This commit check if
ssh_get_server_publickey() is available to use. If it is not, it creates
an alias to ssh_get_publickey() during the configuration.
See the error:

make[3]: Entering directory '/home/julio/Desktop/virt/libvirt/src'
  CC       rpc/libvirt_net_rpc_la-virnetlibsshsession.lo
rpc/virnetlibsshsession.c:217:9: error: 'ssh_get_publickey' is deprecated [-Werror,-Wdeprecated-declarations]
    if (ssh_get_publickey(sess->session, &key) != SSH_OK) {
        ^
/usr/include/libssh/libssh.h:489:1: note: 'ssh_get_publickey' has been explicitly marked deprecated here
SSH_DEPRECATED LIBSSH_API int ssh_get_publickey(ssh_session session, ssh_key *key);
^
/usr/include/libssh/libssh.h:99:40: note: expanded from macro 'SSH_DEPRECATED'
                                       ^
1 error generated.
Makefile:8604: recipe for target 'rpc/libvirt_net_rpc_la-virnetlibsshsession.lo' failed

Julio Faracco (2):
  m4: checking if ssh_get_server_publickey() exists.
  rpc: replacing ssh_get_publickey() by ssh_get_server_publickey().

 m4/virt-libssh.m4             | 13 +++++++++++++
 src/rpc/virnetlibsshsession.c |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

-- 
2.17.0




More information about the libvir-list mailing list