From 2aef8c91346b8faa43dffe1e26b6befc65ed7b1b Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Mon, 8 Feb 2016 18:53:31 +0000 Subject: [PATCH] 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 Reviewed-by: Eric Blake --- scripts/tracetool/backend/simple.py | 3 ++- scripts/tracetool/format/events_c.py | 1 + scripts/tracetool/format/tcg_helper_c.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/tracetool/backend/simple.py b/scripts/tracetool/backend/simple.py index e8c2cd57e9..3246c20015 100644 --- a/scripts/tracetool/backend/simple.py +++ b/scripts/tracetool/backend/simple.py @@ -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"', '') diff --git a/scripts/tracetool/format/events_c.py b/scripts/tracetool/format/events_c.py index 2717ea3a0b..1cc6a49a71 100644 --- a/scripts/tracetool/format/events_c.py +++ b/scripts/tracetool/format/events_c.py @@ -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"', diff --git a/scripts/tracetool/format/tcg_helper_c.py b/scripts/tracetool/format/tcg_helper_c.py index 96655a0590..afd6e98537 100644 --- a/scripts/tracetool/format/tcg_helper_c.py +++ b/scripts/tracetool/format/tcg_helper_c.py @@ -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"',