diff mbox series

[PULL,04/20] disas: Fix build against Capstone v6

Message ID 20240717050331.295371-5-pbonzini@redhat.com (mailing list archive)
State New, archived
Headers show
Series [PULL,01/20] i386/sev: Don't allow automatic fallback to legacy KVM_SEV*_INIT | expand

Commit Message

Paolo Bonzini July 17, 2024, 5:03 a.m. UTC
From: Gustavo Romero <gustavo.romero@linaro.org>

Capstone v6 made major changes, such as renaming for AArch64, which
broke programs using the old headers, like QEMU. However, Capstone v6
provides the CAPSTONE_AARCH64_COMPAT_HEADER compatibility definition
allowing to build against v6 with the old definitions, so fix the QEMU
build using it.

We can lift that definition and switch to the new naming once our
supported distros have Capstone v6 in place.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Link: https://lore.kernel.org/r/20240715213943.1210355-1-gustavo.romero@linaro.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 include/disas/capstone.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/include/disas/capstone.h b/include/disas/capstone.h
index e29068dd977..a11985151d3 100644
--- a/include/disas/capstone.h
+++ b/include/disas/capstone.h
@@ -3,6 +3,7 @@ 
 
 #ifdef CONFIG_CAPSTONE
 
+#define CAPSTONE_AARCH64_COMPAT_HEADER
 #include <capstone.h>
 
 #else