From: Michael S. Tsirkin Date: Wed, 11 Mar 2015 06:56:34 +0000 (+0100) Subject: exec: don't include hw/boards for linux-user X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4485bd269c0e1c051d21d0196be89cdba23d9520;p=qemu.git exec: don't include hw/boards for linux-user As noted by Andreas, hw/boards.h shouldn't be used outside softmmu code. Include it conditionally, and drop the (now unnecessary) ifdef guards in hw/boards.h Reported-by: Andreas Färber Cc: Peter Maydell Signed-off-by: Michael S. Tsirkin Reviewed-by: Andreas Färber --- diff --git a/exec.c b/exec.c index fe64009f0c..bc37c7b485 100644 --- a/exec.c +++ b/exec.c @@ -26,7 +26,9 @@ #include "cpu.h" #include "tcg.h" #include "hw/hw.h" +#if !defined(CONFIG_USER_ONLY) #include "hw/boards.h" +#endif #include "hw/qdev.h" #include "qemu/osdep.h" #include "sysemu/kvm.h" diff --git a/include/hw/boards.h b/include/hw/boards.h index cd6deb0547..f44d6f542a 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -3,8 +3,6 @@ #ifndef HW_BOARDS_H #define HW_BOARDS_H -#if !defined(CONFIG_USER_ONLY) - #include "qemu/typedefs.h" #include "sysemu/blockdev.h" #include "sysemu/accel.h" @@ -158,5 +156,3 @@ struct MachineState { }; #endif - -#endif