Skip to content

Commit

Permalink
scripts/tracetool: Include qemu/osdep.h in generated .c files
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
  • Loading branch information
pm215 committed Feb 16, 2016
1 parent 253785e commit 2aef8c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/tracetool/backend/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"',
'')
Expand Down
1 change: 1 addition & 0 deletions scripts/tracetool/format/events_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
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"',
Expand Down
1 change: 1 addition & 0 deletions scripts/tracetool/format/tcg_helper_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"',
Expand Down

0 comments on commit 2aef8c9

Please sign in to comment.