From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZG3Hy-00029w-Qp for qemu-devel@nongnu.org; Fri, 17 Jul 2015 06:54:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZG3Ht-0005Ey-Ub for qemu-devel@nongnu.org; Fri, 17 Jul 2015 06:54:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZG3Ht-0005Et-QP for qemu-devel@nongnu.org; Fri, 17 Jul 2015 06:54:41 -0400 Date: Fri, 17 Jul 2015 11:54:37 +0100 From: "Daniel P. Berrange" Message-ID: <20150717105437.GF4835@redhat.com> References: <1437062641-12684-1-git-send-email-rkrcmar@redhat.com> <1437062641-12684-2-git-send-email-rkrcmar@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1437062641-12684-2-git-send-email-rkrcmar@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 1/3] crypto: fix build with nettle >= 3.0.0 Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Radim =?utf-8?B?S3LEjW3DocWZ?= Cc: Peter Maydell , qemu-devel@nongnu.org On Thu, Jul 16, 2015 at 06:03:59PM +0200, Radim Kr=C4=8Dm=C3=A1=C5=99 wro= te: > In nettle 3, cbc_encrypt() accepts 'nettle_cipher_func' instead of > 'nettle_crypt_func' and these two differ in 'const' qualifier of the > first argument. The build fails with: >=20 > In file included from crypto/cipher.c:71:0: > ./crypto/cipher-nettle.c: In function =E2=80=98qcrypto_cipher_encrypt= =E2=80=99: > ./crypto/cipher-nettle.c:154:38: error: passing argument 2 of > =E2=80=98nettle_cbc_encrypt=E2=80=99 from incompatible pointer type > cbc_encrypt(ctx->ctx_encrypt, ctx->alg_encrypt, > ^ > In file included from ./crypto/cipher-nettle.c:24:0, > from crypto/cipher.c:71: > /usr/include/nettle/cbc.h:48:1: note: expected > =E2=80=98void (*)(const void *, size_t, uint8_t *, const uint8_t *) > but argument is of type > =E2=80=98void (*)( void *, size_t, uint8_t *, const uint8_t *) >=20 > To allow both versions, we switch to the new definition and #if typedef > it for old versions. >=20 > Signed-off-by: Radim Kr=C4=8Dm=C3=A1=C5=99 > --- > v3: no change > v2: fix typo in crypto >=20 > configure | 4 +++- > crypto/cipher-nettle.c | 16 ++++++++++------ > 2 files changed, 13 insertions(+), 7 deletions(-) Reviewed-by: Daniel P. Berrange Regards, Daniel --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://autobuild.org -o- http://search.cpan.org/~danberr= / :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vn= c :|