From patchwork Thu Oct 18 09:16:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 192247 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 8EFB72C009A for ; Thu, 18 Oct 2012 20:19:16 +1100 (EST) Received: from localhost ([::1]:37140 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOmG2-00036y-3e for incoming@patchwork.ozlabs.org; Thu, 18 Oct 2012 05:19:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOmFu-00036f-Bv for qemu-devel@nongnu.org; Thu, 18 Oct 2012 05:19:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOmFt-0007sp-3D for qemu-devel@nongnu.org; Thu, 18 Oct 2012 05:19:06 -0400 Received: from co1ehsobe001.messaging.microsoft.com ([216.32.180.184]:9750 helo=co1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOmFs-0007sl-Qu for qemu-devel@nongnu.org; Thu, 18 Oct 2012 05:19:05 -0400 Received: from mail88-co1-R.bigfish.com (10.243.78.248) by CO1EHSOBE004.bigfish.com (10.243.66.67) with Microsoft SMTP Server id 14.1.225.23; Thu, 18 Oct 2012 09:19:03 +0000 Received: from mail88-co1 (localhost [127.0.0.1]) by mail88-co1-R.bigfish.com (Postfix) with ESMTP id 5EE06200BE; Thu, 18 Oct 2012 09:19:03 +0000 (UTC) X-Forefront-Antispam-Report: CIP:163.181.249.109; KIP:(null); UIP:(null); IPV:NLI; H:ausb3twp02.amd.com; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VPS0(zzzz1202h1d1ah1d2ahzz8275bhz2dh668h839hd24he5bhf0ah107ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1155h) Received: from mail88-co1 (localhost.localdomain [127.0.0.1]) by mail88-co1 (MessageSwitch) id 1350551602982897_26378; Thu, 18 Oct 2012 09:13:22 +0000 (UTC) Received: from CO1EHSMHS011.bigfish.com (unknown [10.243.78.249]) by mail88-co1.bigfish.com (Postfix) with ESMTP id EE1D0640539; Thu, 18 Oct 2012 09:13:22 +0000 (UTC) Received: from ausb3twp02.amd.com (163.181.249.109) by CO1EHSMHS011.bigfish.com (10.243.66.21) with Microsoft SMTP Server id 14.1.225.23; Thu, 18 Oct 2012 09:13:21 +0000 X-WSS-ID: 0MC30A4-02-5FE-02 X-M-MSG: Received: from sausexedgep01.amd.com (sausexedgep01-ext.amd.com [163.181.249.72]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by ausb3twp02.amd.com (Axway MailGate 3.8.1) with ESMTP id 206AFFCC003; Thu, 18 Oct 2012 04:13:16 -0500 (CDT) Received: from SAUSEXDAG06.amd.com (163.181.55.7) by sausexedgep01.amd.com (163.181.36.54) with Microsoft SMTP Server (TLS) id 8.3.192.1; Thu, 18 Oct 2012 04:29:13 -0500 Received: from STOREXDAG04.amd.com (10.1.13.13) by sausexdag06.amd.com (163.181.55.7) with Microsoft SMTP Server (TLS) id 14.2.318.4; Thu, 18 Oct 2012 04:13:19 -0500 Received: from gwo.osrc.amd.com (165.204.16.204) by storexdag04.amd.com (10.1.13.13) with Microsoft SMTP Server id 14.1.323.3; Thu, 18 Oct 2012 05:13:17 -0400 Received: from tronje.osrc.amd.com (tronje.osrc.amd.com [165.204.15.48]) by gwo.osrc.amd.com (Postfix) with ESMTP id 6276C49C0D5; Thu, 18 Oct 2012 10:13:17 +0100 (BST) From: Andre Przywara To: Date: Thu, 18 Oct 2012 11:16:58 +0200 Message-ID: <1350551818-14717-1-git-send-email-andre.przywara@amd.com> X-Mailer: git-send-email 1.7.12.1 MIME-Version: 1.0 X-OriginatorOrg: amd.com X-detected-operating-system: by eggs.gnu.org: Windows XP/2000 (RFC1323+, w+, tstamp-) X-Received-From: 216.32.180.184 Cc: Andre Przywara , Gerd Hoffmann , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] vnc-tls: Fix compilation with newer versions of GNU-TLS X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org In my installation of GNU-TLS (v3.0.23) the type gnutls_anon_server_credentials is marked deprecated, so -Werror breaks compilation. Simply replacing it with the newer ..._t version fixed the compilation on my machine (Slackware 14.0). I cannot tell how far back this "new" type goes, at least the header file in RHEL 5.0 (v1.4.1) seems to have it already. If someone finds a broken distribution, tell me and I insert some compat code. Signed-off-by: Andre Przywara Acked-by: Gerd Hoffmann --- ui/vnc-tls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c index a7f7d07..ba3827b 100644 --- a/ui/vnc-tls.c +++ b/ui/vnc-tls.c @@ -99,9 +99,9 @@ static ssize_t vnc_tls_pull(gnutls_transport_ptr_t transport, } -static gnutls_anon_server_credentials vnc_tls_initialize_anon_cred(void) +static gnutls_anon_server_credentials_t vnc_tls_initialize_anon_cred(void) { - gnutls_anon_server_credentials anon_cred; + gnutls_anon_server_credentials_t anon_cred; int ret; if ((ret = gnutls_anon_allocate_server_credentials(&anon_cred)) < 0) { @@ -382,7 +382,7 @@ int vnc_tls_client_setup(struct VncState *vs, } } else { - gnutls_anon_server_credentials anon_cred = vnc_tls_initialize_anon_cred(); + gnutls_anon_server_credentials_t anon_cred = vnc_tls_initialize_anon_cred(); if (!anon_cred) { gnutls_deinit(vs->tls.session); vs->tls.session = NULL;