提交 4485bd26 编写于 作者: M Michael S. Tsirkin

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: NAndreas Färber <afaerber@suse.de>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Reviewed-by: NAndreas Färber <afaerber@suse.de>
上级 79272661
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
#include "cpu.h" #include "cpu.h"
#include "tcg.h" #include "tcg.h"
#include "hw/hw.h" #include "hw/hw.h"
#if !defined(CONFIG_USER_ONLY)
#include "hw/boards.h" #include "hw/boards.h"
#endif
#include "hw/qdev.h" #include "hw/qdev.h"
#include "qemu/osdep.h" #include "qemu/osdep.h"
#include "sysemu/kvm.h" #include "sysemu/kvm.h"
......
...@@ -3,8 +3,6 @@ ...@@ -3,8 +3,6 @@
#ifndef HW_BOARDS_H #ifndef HW_BOARDS_H
#define HW_BOARDS_H #define HW_BOARDS_H
#if !defined(CONFIG_USER_ONLY)
#include "qemu/typedefs.h" #include "qemu/typedefs.h"
#include "sysemu/blockdev.h" #include "sysemu/blockdev.h"
#include "sysemu/accel.h" #include "sysemu/accel.h"
...@@ -158,5 +156,3 @@ struct MachineState { ...@@ -158,5 +156,3 @@ struct MachineState {
}; };
#endif #endif
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册