diff options
author | Alexander Graf <agraf@suse.de> | 2014-01-27 18:22:10 +0100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2014-03-05 03:06:24 +0100 |
commit | 9c06a1f79f959fffd09bfb7efc3d76051a6cd2da (patch) | |
tree | 36acce2500ad3f1376a092f5cb5b44f2a0b83ec8 /include/hw | |
parent | 88ccd23a0c99155ff1eb5162d3685fde9c679b3d (diff) |
KVM: Split QEMUMachine typedef into separate header
Older gcc versions (such as the one in SLES11) get confused when you declare
a typedef on the same struct twice.
To work around that limitation, let's extract the QEMUMachine typedef into a
separate header file that is guarded by preprocessor duplicate include checks.
This fixes the following type of compile errors for me:
In file included from vl.c:125:
include/hw/xen/xen.h:39: error: redefinition of typedef "QEMUMachine"
include/sysemu/kvm.h:155: error: previous declaration of "QEMUMachine" was here
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/boards.h | 3 | ||||
-rw-r--r-- | include/hw/xen/xen.h | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/hw/boards.h b/include/hw/boards.h index 2151460f9e..ed6d9f8749 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -4,10 +4,9 @@ #define HW_BOARDS_H #include "sysemu/blockdev.h" +#include "sysemu/qemumachine.h" #include "hw/qdev.h" -typedef struct QEMUMachine QEMUMachine; - typedef struct QEMUMachineInitArgs { const QEMUMachine *machine; ram_addr_t ram_size; diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h index e1f88bf9cf..81e5bb1b22 100644 --- a/include/hw/xen/xen.h +++ b/include/hw/xen/xen.h @@ -10,6 +10,7 @@ #include "hw/irq.h" #include "qemu-common.h" +#include "sysemu/qemumachine.h" /* xen-machine.c */ enum xen_mode { |