file://0010-configure-lookup-meson-exutable-from-PATH.patch \
file://0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch \
file://0001-sched_attr-Do-not-define-for-glibc-2.41.patch \
+ file://0001-util-util-cpuinfo-riscv.c-fix-riscv64-build-on-musl-.patch \
file://qemu-guest-agent.init \
file://qemu-guest-agent.udev \
"
--- /dev/null
+From f60ea4ae2298f0f077a97648c138283357337370 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Milan=20P=2E=20Stani=C4=87?= <mps@arvanta.net>
+Date: Thu, 5 Sep 2024 16:17:50 +0200
+Subject: [PATCH] util/util/cpuinfo-riscv.c: fix riscv64 build on musl libc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+build fails on musl libc (alpine linux) with this error:
+
+../util/cpuinfo-riscv.c: In function 'cpuinfo_init':
+../util/cpuinfo-riscv.c:63:21: error: '__NR_riscv_hwprobe' undeclared (first use in this function); did you mean 'riscv_hwprobe'?
+ 63 | if (syscall(__NR_riscv_hwprobe, &pair, 1, 0, NULL, 0) == 0
+ | ^~~~~~~~~~~~~~~~~~
+ | riscv_hwprobe
+../util/cpuinfo-riscv.c:63:21: note: each undeclared identifier is reported only once for each function it appears in
+ninja: subcommand failed
+
+add '#include "asm/unistd.h"' to util/cpuinfo-riscv.c fixes build
+
+Upstream-Status: Backport [https://github.com/qemu/qemu/commit/c5757f808bd74db7ef1a90ee28334f3b5afb8179]
+Signed-off-by: Milan P. Stanić <mps@arvanta.net>
+---
+ util/cpuinfo-riscv.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/util/cpuinfo-riscv.c b/util/cpuinfo-riscv.c
+index 497ce12680..8cacc67645 100644
+--- a/util/cpuinfo-riscv.c
++++ b/util/cpuinfo-riscv.c
+@@ -9,6 +9,7 @@
+ #ifdef CONFIG_ASM_HWPROBE_H
+ #include <asm/hwprobe.h>
+ #include <sys/syscall.h>
++#include <asm/unistd.h>
+ #endif
+
+ unsigned cpuinfo;
+--
+2.46.0
+