From: "Daniel P. Berrangé" <berrange@redhat.com>
To: marcandre.lureau@redhat.com
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH] crypto: fix build against nettle >= 4
Date: Thu, 13 Aug 2026 09:31:19 +0100 [thread overview]
Message-ID: <an2A16zUXOKsndd7@redhat.com> (raw)
In-Reply-To: <20260813074048.3624651-1-marcandre.lureau@redhat.com>
On Thu, Aug 13, 2026 at 11:40:48AM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> sha.h has been deprecated. It seems we could just rely on sha1.h/sha2.h
> for older versions too, but I didn't check.
They split the headers back in 2012 according to git, and our min
version is 3.7.3 which certainly has them, so drop the conditional.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4184
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> crypto/hash-nettle.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/crypto/hash-nettle.c b/crypto/hash-nettle.c
> index 53f68301efb5..c0ebb44e11f0 100644
> --- a/crypto/hash-nettle.c
> +++ b/crypto/hash-nettle.c
> @@ -23,8 +23,14 @@
> #include "qapi/error.h"
> #include "crypto/hash.h"
> #include "hashpriv.h"
> +#include <nettle/version.h>
> #include <nettle/md5.h>
> +#if NETTLE_VERSION_MAJOR >= 4
> +#include <nettle/sha1.h>
> +#include <nettle/sha2.h>
> +#else
> #include <nettle/sha.h>
> +#endif
> #include <nettle/ripemd160.h>
> #ifdef CONFIG_CRYPTO_SM3
> #include <nettle/sm3.h>
> --
> 2.55.0.543.g5ebe2ebe4ea8
>
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
prev parent reply other threads:[~2026-08-13 8:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 7:40 [PATCH] crypto: fix build against nettle >= 4 marcandre.lureau
2026-08-13 8:25 ` Philippe Mathieu-Daudé
2026-08-13 8:26 ` Philippe Mathieu-Daudé
2026-08-13 8:31 ` Daniel P. Berrangé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=an2A16zUXOKsndd7@redhat.com \
--to=berrange@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.