Patchwork [14/24] sysemu.h: include qemu-types.h instead of qemu-common.h

login
register
mail settings
Submitter Eduardo Habkost
Date Nov. 9, 2012, 2:56 p.m.
Message ID <1352473012-20500-15-git-send-email-ehabkost@redhat.com>
Download mbox | patch
Permalink /patch/198104/
State New
Headers show

Comments

Eduardo Habkost - Nov. 9, 2012, 2:56 p.m.
It just needs the Monitor and DeviceState typedefs, so it doesn't need
all of qemu-common.h.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 sysemu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Andreas Färber - Nov. 14, 2012, 9:56 p.m.
Am 09.11.2012 15:56, schrieb Eduardo Habkost:
> It just needs the Monitor and DeviceState typedefs, so it doesn't need
> all of qemu-common.h.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  sysemu.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sysemu.h b/sysemu.h
> index f5ac664..ab1ef8b 100644
> --- a/sysemu.h
> +++ b/sysemu.h
> @@ -2,7 +2,7 @@
>  #define SYSEMU_H
>  /* Misc. things related to the system emulator.  */
>  
> -#include "qemu-common.h"
> +#include "qemu-types.h"
>  #include "qemu-option.h"
>  #include "qemu-queue.h"
>  #include "qemu-timer.h"

  CC    i386-softmmu/hw/i386/../kvmvapic.o
In file included from /home/andreas/QEMU/qemu-rcar/target-i386/cpu.h:839:0,
                 from /home/andreas/QEMU/qemu-rcar/qemu-common.h:130,
                 from ../qapi-types.h:19,
                 from /home/andreas/QEMU/qemu-rcar/error.h:16,
                 from /home/andreas/QEMU/qemu-rcar/qemu-option.h:31,
                 from /home/andreas/QEMU/qemu-rcar/sysemu.h:6,
                 from /home/andreas/QEMU/qemu-rcar/hw/i386/../kvmvapic.c:11:
/home/andreas/QEMU/qemu-rcar/target-i386/cpu-qom.h:76:35: error: unknown
type name ‘Error’
make[1]: *** [hw/i386/../kvmvapic.o] Fehler 1
make: *** [subdir-i386-softmmu] Fehler 2

Probably "error.h" needed, too.

Andreas
Andreas Färber - Nov. 14, 2012, 10:19 p.m.
Am 14.11.2012 22:56, schrieb Andreas Färber:
> Am 09.11.2012 15:56, schrieb Eduardo Habkost:
>> It just needs the Monitor and DeviceState typedefs, so it doesn't need
>> all of qemu-common.h.
>>
>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>> ---
>>  sysemu.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/sysemu.h b/sysemu.h
>> index f5ac664..ab1ef8b 100644
>> --- a/sysemu.h
>> +++ b/sysemu.h
>> @@ -2,7 +2,7 @@
>>  #define SYSEMU_H
>>  /* Misc. things related to the system emulator.  */
>>  
>> -#include "qemu-common.h"
>> +#include "qemu-types.h"
>>  #include "qemu-option.h"
>>  #include "qemu-queue.h"
>>  #include "qemu-timer.h"
> 
>   CC    i386-softmmu/hw/i386/../kvmvapic.o
> In file included from /home/andreas/QEMU/qemu-rcar/target-i386/cpu.h:839:0,
>                  from /home/andreas/QEMU/qemu-rcar/qemu-common.h:130,
>                  from ../qapi-types.h:19,
>                  from /home/andreas/QEMU/qemu-rcar/error.h:16,
>                  from /home/andreas/QEMU/qemu-rcar/qemu-option.h:31,
>                  from /home/andreas/QEMU/qemu-rcar/sysemu.h:6,
>                  from /home/andreas/QEMU/qemu-rcar/hw/i386/../kvmvapic.c:11:
> /home/andreas/QEMU/qemu-rcar/target-i386/cpu-qom.h:76:35: error: unknown
> type name ‘Error’
> make[1]: *** [hw/i386/../kvmvapic.o] Fehler 1
> make: *** [subdir-i386-softmmu] Fehler 2
> 
> Probably "error.h" needed, too.

Scratch that last part. There's a cyclic inclusion of qemu-common.h,
solved by the qapi-types.h patch 16/24. Reordering solves this issue.
Given that,

Acked-by: Andreas Färber <afaerber@suse.de>

Andreas

Patch

diff --git a/sysemu.h b/sysemu.h
index f5ac664..ab1ef8b 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -2,7 +2,7 @@ 
 #define SYSEMU_H
 /* Misc. things related to the system emulator.  */
 
-#include "qemu-common.h"
+#include "qemu-types.h"
 #include "qemu-option.h"
 #include "qemu-queue.h"
 #include "qemu-timer.h"