Commit 0e62034ca1 for qemu.org
commit 0e62034ca10f9d71fba43c8277a6590540217df8
Author: Marc-André Lureau <marcandre.lureau@redhat.com>
Date: Sun Jun 28 23:50:46 2026 +0400
crypto: fix build against nettle >= 4
sha.h has been deprecated. It seems we can rely on sha1.h/sha2.h
since we depend on >= 3.7.3.
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/4184
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
diff --git a/crypto/hash-nettle.c b/crypto/hash-nettle.c
index 53f68301ef..2589bbf4c1 100644
--- a/crypto/hash-nettle.c
+++ b/crypto/hash-nettle.c
@@ -24,7 +24,8 @@
#include "crypto/hash.h"
#include "hashpriv.h"
#include <nettle/md5.h>
-#include <nettle/sha.h>
+#include <nettle/sha1.h>
+#include <nettle/sha2.h>
#include <nettle/ripemd160.h>
#ifdef CONFIG_CRYPTO_SM3
#include <nettle/sm3.h>