diff mbox

[3/5] qapi-types.h doesn't really need to include qemu-common.h

Message ID 1345419579-25499-4-git-send-email-imammedo@redhat.com
State New
Headers show

Commit Message

Igor Mammedov Aug. 19, 2012, 11:39 p.m. UTC
needed to prevent build breakage when CPU becomes a child of DeviceState

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 scripts/qapi-types.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Luiz Capitulino Aug. 20, 2012, 3:22 p.m. UTC | #1
On Mon, 20 Aug 2012 01:39:37 +0200
Igor Mammedov <imammedo@redhat.com> wrote:

> needed to prevent build breakage when CPU becomes a child of DeviceState
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  scripts/qapi-types.py |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
> index cf601ae..f34addb 100644
> --- a/scripts/qapi-types.py
> +++ b/scripts/qapi-types.py
> @@ -263,7 +263,7 @@ fdecl.write(mcgen('''
>  #ifndef %(guard)s
>  #define %(guard)s
>  
> -#include "qemu-common.h"
> +#include <stdbool.h>

Please, also include <stdint.h>, as int64_t is used in qapi-types.h.

The build doesn't break probably because files including qapi-types.h are
including <stdint.h> first.

>  
>  ''',
>                    guard=guardname(h_file)))
Igor Mammedov Aug. 20, 2012, 7:59 p.m. UTC | #2
On Mon, 20 Aug 2012 12:22:10 -0300
Luiz Capitulino <lcapitulino@redhat.com> wrote:

> On Mon, 20 Aug 2012 01:39:37 +0200
> Igor Mammedov <imammedo@redhat.com> wrote:
> 
> > needed to prevent build breakage when CPU becomes a child of DeviceState
> > 
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> >  scripts/qapi-types.py |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> > 
> > diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
> > index cf601ae..f34addb 100644
> > --- a/scripts/qapi-types.py
> > +++ b/scripts/qapi-types.py
> > @@ -263,7 +263,7 @@ fdecl.write(mcgen('''
> >  #ifndef %(guard)s
> >  #define %(guard)s
> >  
> > -#include "qemu-common.h"
> > +#include <stdbool.h>
> 
> Please, also include <stdint.h>, as int64_t is used in qapi-types.h.
> 
> The build doesn't break probably because files including qapi-types.h are
> including <stdint.h> first.
Thanks for suggestion. I'll fix it for next respin.

> 
> >  
> >  ''',
> >                    guard=guardname(h_file)))
>
diff mbox

Patch

diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
index cf601ae..f34addb 100644
--- a/scripts/qapi-types.py
+++ b/scripts/qapi-types.py
@@ -263,7 +263,7 @@  fdecl.write(mcgen('''
 #ifndef %(guard)s
 #define %(guard)s
 
-#include "qemu-common.h"
+#include <stdbool.h>
 
 ''',
                   guard=guardname(h_file)))