scripts/tracetool: Include qemu/osdep.h in generated .c files

Include qemu/osdep.h as the first include in generated .c files,
so they don't implicitly rely on some other included header
to pull it in.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Peter Maydell 2016-02-08 18:53:31 +00:00
parent 253785e3b9
commit 2aef8c9134
3 changed files with 4 additions and 1 deletions

View File

@ -42,7 +42,8 @@ def generate_h(event):
def generate_c_begin(events):
out('#include "trace.h"',
out('#include "qemu/osdep.h"',
'#include "trace.h"',
'#include "trace/control.h"',
'#include "trace/simple.h"',
'')

View File

@ -19,6 +19,7 @@ from tracetool import out
def generate(events, backend):
out('/* This file is autogenerated by tracetool, do not edit. */',
'',
'#include "qemu/osdep.h"',
'#include "trace.h"',
'#include "trace/generated-events.h"',
'#include "trace/control.h"',

View File

@ -23,6 +23,7 @@ def generate(events, backend):
out('/* This file is autogenerated by tracetool, do not edit. */',
'',
'#include "qemu/osdep.h"',
'#include "qemu-common.h"',
'#include "trace.h"',
'#include "exec/helper-proto.h"',