From nobody Wed May 1 01:38:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 152586260869670.5701242814115; Wed, 9 May 2018 03:43:28 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0207530015CA; Wed, 9 May 2018 10:43:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97CB810840C8; Wed, 9 May 2018 10:43:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AAE964CAA1; Wed, 9 May 2018 10:43:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w49AgiGB025850 for ; Wed, 9 May 2018 06:42:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2742C2010CBA; Wed, 9 May 2018 10:42:44 +0000 (UTC) Received: from mx1.redhat.com (ext-mx19.extmail.prod.ext.phx2.redhat.com [10.5.110.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1DB612010CAE for ; Wed, 9 May 2018 10:42:41 +0000 (UTC) Received: from mail-qk0-f172.google.com (mail-qk0-f172.google.com [209.85.220.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CA0003002F9C for ; Wed, 9 May 2018 10:42:30 +0000 (UTC) Received: by mail-qk0-f172.google.com with SMTP id c64so2237798qkf.12 for ; Wed, 09 May 2018 03:42:30 -0700 (PDT) Received: from localhost.localdomain ([177.83.73.134]) by smtp.gmail.com with ESMTPSA id x81sm21556965qka.50.2018.05.09.03.42.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 May 2018 03:42:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=J/f3vhI//Alomo97FQkdGlg6+oWZoUkK2oWd9ygVM2g=; b=s8DxLls9pySCeXF2nhk383hBm0GR8UCbDZTrbXuxnDn/H6pV1slUKBcE/M98+8FYzi mISLahjnOByE49nsOzmXE0brQTdEHIxwRwban0KGV8JbB5e4+FOPSMgOAfpFvNOdOZJv HR5YfVq+G6k+6zjN1kSxdXOQ+4E2SwgekxBkP5GajA2ZHSpvRNYuIImdLX+ByPEjtfDs kgYlKGF+NV1PeIgVIEVqpC6/RXh97HmFcgZZr8D2gy1nt78TABoj0nhV8NouVcSzObHU xdjoZIO8bpilPhWYHGZgsHHRpAwmqvZ5+PtPCLM3wPW2/kDAzqgf4UWpCN7MxB48Lr53 l68w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=J/f3vhI//Alomo97FQkdGlg6+oWZoUkK2oWd9ygVM2g=; b=XkuwZkQHJBWaoLBlJvWBeevdMSYuZnUmWiDI8po64Zrk9pHe7fP2G1ZKjZk0/oJk6v muksf8AjuQLjVMmyoZVi3Byp++VFZN5QzSnwEzExWHit8T84DesX3rJ8gU+lwGB/bbph 2nHdHay714b0l/aCtvQsfMNOKQ8nJ7t91wJBFBtfOLttMlxELbm7ubr7qcc3OjrfzVGy Z4dAK6qr40W0+0bUEF4zPoBPUMUzHWNIbuRoeP5B3orX72pbnb3w8NOiic977+hYhVxO xTXErtIjOaPzkGRxbZW1jtAHnCsehf2zxmLryza6vhCWpDXlfDfQYui8Ie8I1/gCUBBB uwBQ== X-Gm-Message-State: ALQs6tAcASx0Bp3RJyf1O8pdYVwvSTKHlQf8h52or67QjE9hMCVaMvGF 4xDGvNfi3NLHS5h/u6rRDU/6mw== X-Google-Smtp-Source: AB8JxZoCkq7YDazNf69FjAlqRDBDOmCSxl8HbKntl0OuS7irKkZy1iYulnhHVawytb5e5/q+w1brJg== X-Received: by 10.55.6.145 with SMTP id 139mr36296562qkg.232.1525862549721; Wed, 09 May 2018 03:42:29 -0700 (PDT) From: Julio Faracco To: libvir-list@redhat.com Date: Wed, 9 May 2018 07:42:13 -0300 Message-Id: <20180509104213.1791-1-jcfaracco@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 09 May 2018 10:42:30 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Wed, 09 May 2018 10:42:30 +0000 (UTC) for IP:'209.85.220.172' DOMAIN:'mail-qk0-f172.google.com' HELO:'mail-qk0-f172.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.301 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, SPF_PASS, T_DKIM_INVALID) 209.85.220.172 mail-qk0-f172.google.com 209.85.220.172 mail-qk0-f172.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.48 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2] rpc: fixing compilation error due to deprecated ssh_get_publickey(). X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 09 May 2018 10:43:27 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" After 0.7.5 release, libssh deprecated ssh_get_publickey() method to introduce ssh_get_server_publickey(). This commit check the current version of libssh and use the proper method during the compilation. 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) !=3D SSH_OK) { ^ /usr/include/libssh/libssh.h:489:1: note: 'ssh_get_publickey' has been expl= icitly marked deprecated here SSH_DEPRECATED LIBSSH_API int ssh_get_publickey(ssh_session session, ssh_ke= y *key); ^ /usr/include/libssh/libssh.h:99:40: note: expanded from macro 'SSH_DEPRECAT= ED' ^ 1 error generated. Makefile:8604: recipe for target 'rpc/libvirt_net_rpc_la-virnetlibsshsessio= n.lo' failed Signed-off-by: Julio Faracco --- src/rpc/virnetlibsshsession.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index 309e8a9340..9dc7976828 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -214,7 +214,11 @@ virLibsshServerKeyAsString(virNetLibsshSessionPtr sess) size_t keyhashlen; char *str; =20 - if (ssh_get_publickey(sess->session, &key) !=3D SSH_OK) { +#if LIBSSH_VERSION_INT <=3D 0x0705 /* 0.7.5 */ +# define ssh_get_server_publickey ssh_get_publickey +#endif + + if (ssh_get_server_publickey(sess->session, &key) !=3D SSH_OK) { virReportError(VIR_ERR_LIBSSH, "%s", _("failed to get the key of the current " "session")); --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list