The 'hwaddr' type is restricted to system-mode. Declare it poisoned on user-mode emulation.
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- Checkpatch complains: WARNING: architecture specific defines should be avoided #10: FILE: include/exec/cpu-common.h:7: +#ifdef __GNUC__ --- include/exec/cpu-common.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index b47e5630e7..56cfce8153 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -3,9 +3,13 @@ /* CPU interfaces that are target independent. */ -#ifndef CONFIG_USER_ONLY +#ifdef CONFIG_USER_ONLY +#ifdef __GNUC__ +#pragma GCC poison hwaddr +#endif /* __GNUC__ */ +#else #include "exec/hwaddr.h" -#endif +#endif /* CONFIG_USER_ONLY */ /* The CPU list lock nests outside page_(un)lock or mmap_(un)lock */ void qemu_init_cpu_list(void); -- 2.21.3