File perf-debug-remove-needless-include-directives-from-debug-h.patch of Package perf
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Thu, 29 Aug 2019 16:18:59 -0300
Subject: perf debug: Remove needless include directives from debug.h
Git-commit: 8520a98dbab61e9e340cdfb72dd17ccc8a98961e
(partial)
Patch-mainline: v5.4-rc1
References: jsc#SLE-13661
Patch-filtered: tools/perf/util/expr.y tools/perf/tests/expr.c
X-Info: filtered patch
All we need there is a forward declaration for 'union perf_event', so
remove it from there and add missing header directives in places using
things from this indirect include.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-7ftk0ztstqub1tirjj8o8xbl@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Tony Jones <tonyj@suse.de>
---
tools/perf/util/expr.y | 2 ++
1 file changed, 2 insertions(+)
--- a/tools/perf/util/expr.y
+++ b/tools/perf/util/expr.y
@@ -2,9 +2,11 @@
%{
#include "util.h"
#include "util/debug.h"
+#include <stdlib.h> // strtod()
#define IN_EXPR_Y 1
#include "expr.h"
#include "smt.h"
+#include <assert.h>
#include <string.h>
#define MAXIDLEN 256
--- a/tools/perf/tests/expr.c
+++ b/tools/perf/tests/expr.c
@@ -3,6 +3,7 @@
#include "util/expr.h"
#include "tests.h"
#include <stdlib.h>
+#include <string.h>
#include <linux/zalloc.h>
static int test(struct parse_ctx *ctx, const char *e, double val2)