Message ID | 535ABF74.3030104@suse.de |
---|---|
State | New |
Headers | show |
On Fri, 2014-04-25 at 22:03 +0200, Andreas Färber wrote: > Am 09.04.2014 19:34, schrieb Marcel Apfelbaum: > > This minimizes QEMUMachine usage, as part of machine QOM-ification. > > > > Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> > > --- > > include/hw/xen/xen.h | 2 +- > > include/qemu/typedefs.h | 1 + > > include/sysemu/kvm.h | 2 +- > > include/sysemu/qtest.h | 2 +- > > kvm-all.c | 6 +++--- > > kvm-stub.c | 2 +- > > qtest.c | 2 +- > > vl.c | 10 +++++----- > > xen-all.c | 2 +- > > xen-stub.c | 2 +- > > 10 files changed, 16 insertions(+), 15 deletions(-) > [...] > > diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h > > index bf8daac..86bab12 100644 > > --- a/include/qemu/typedefs.h > > +++ b/include/qemu/typedefs.h > > @@ -31,6 +31,7 @@ typedef struct MemoryListener MemoryListener; > > typedef struct MemoryMappingList MemoryMappingList; > > > > typedef struct QEMUMachine QEMUMachine; > > +typedef struct MachineClass MachineClass; > > typedef struct NICInfo NICInfo; > > typedef struct HCIInfo HCIInfo; > > typedef struct AudioState AudioState; > [snip] > > You're adding this typedef in a central file, but keep the typedef in > include/hw/boards.h around. Chances are, some file will include both > qemu/typedefs.h and hw/boards.h. Older GCCs will complain about that. Good catch! Thanks! Marcel > Fixing as follows: > > diff --git a/include/hw/boards.h b/include/hw/boards.h > index be2e432..8f53334 100644 > --- a/include/hw/boards.h > +++ b/include/hw/boards.h > @@ -3,12 +3,11 @@ > #ifndef HW_BOARDS_H > #define HW_BOARDS_H > > +#include "qemu/typedefs.h" > #include "sysemu/blockdev.h" > #include "hw/qdev.h" > #include "qom/object.h" > > -typedef struct MachineClass MachineClass; > - > typedef struct QEMUMachineInitArgs { > const MachineClass *machine; > ram_addr_t ram_size; > > Regards, > Andreas >
diff --git a/include/hw/boards.h b/include/hw/boards.h index be2e432..8f53334 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -3,12 +3,11 @@ #ifndef HW_BOARDS_H #define HW_BOARDS_H +#include "qemu/typedefs.h" #include "sysemu/blockdev.h" #include "hw/qdev.h" #include "qom/object.h" -typedef struct MachineClass MachineClass; - typedef struct QEMUMachineInitArgs { const MachineClass *machine; ram_addr_t ram_size;