summary refs log tree commit diff stats
path: root/include/qemu/osdep.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2025-07-29 13:40:15 -1000
committerRichard Henderson <richard.henderson@linaro.org>2025-08-28 06:39:25 +1000
commita859022ceaba12444f1a8f5a5efc5e76c7d5dc13 (patch)
tree0b6adba2a47361afcb34c92095a5398f24beeb68 /include/qemu/osdep.h
parent58afe4cfe93be0e283e7a0fcd9a50fd52fc44169 (diff)
downloadfocaccia-qemu-a859022ceaba12444f1a8f5a5efc5e76c7d5dc13.tar.gz
focaccia-qemu-a859022ceaba12444f1a8f5a5efc5e76c7d5dc13.zip
linux-user: Move ppc uabi/asm/elf.h workaround to osdep.h
Move the workaround out of linux-user/elfload.c, so that
we don't have to replicate it in many places.  Place it
immediately after the include of <signal.h>, which draws
in the relevant symbols.

Note that ARCH_DLINFO is not defined by the kernel header,
and so there's no need to undef it either.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r--include/qemu/osdep.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 96fe51bc39..be3460b32f 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -133,6 +133,14 @@ QEMU_EXTERN_C int daemon(int, int);
 #include <setjmp.h>
 #include <signal.h>
 
+/*
+ * Avoid conflict with linux/arch/powerpc/include/uapi/asm/elf.h, included
+ * from <asm/sigcontext.h>, but we might as well do this unconditionally.
+ */
+#undef ELF_CLASS
+#undef ELF_DATA
+#undef ELF_ARCH
+
 #ifdef CONFIG_IOVEC
 #include <sys/uio.h>
 #endif