summaryrefslogtreecommitdiffstats
path: root/debian/patches/bugfix/all/tools-perf-fix-build-without-libbfd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/bugfix/all/tools-perf-fix-build-without-libbfd.patch')
-rw-r--r--debian/patches/bugfix/all/tools-perf-fix-build-without-libbfd.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/patches/bugfix/all/tools-perf-fix-build-without-libbfd.patch b/debian/patches/bugfix/all/tools-perf-fix-build-without-libbfd.patch
new file mode 100644
index 000000000..726bdfc47
--- /dev/null
+++ b/debian/patches/bugfix/all/tools-perf-fix-build-without-libbfd.patch
@@ -0,0 +1,26 @@
+From: Ben Hutchings <benh@debian.org>
+Date: Tue, 05 Jul 2022 18:02:28 +0200
+Subject: tools/perf: Fix build without libbfd
+
+Only include <tools/dis-asm-compat.h> if we are using libbfd.
+
+Signed-off-by: Ben Hutchings <benh@debian.org>
+---
+--- a/tools/perf/util/annotate.c
++++ b/tools/perf/util/annotate.c
+@@ -41,7 +41,6 @@
+ #include <linux/string.h>
+ #include <subcmd/parse-options.h>
+ #include <subcmd/run-command.h>
+-#include <tools/dis-asm-compat.h>
+
+ /* FIXME: For the HE_COLORSET */
+ #include "ui/browser.h"
+@@ -1721,6 +1720,7 @@ fallback:
+ #include <bpf/btf.h>
+ #include <bpf/libbpf.h>
+ #include <linux/btf.h>
++#include <tools/dis-asm-compat.h>
+
+ static int symbol__disassemble_bpf(struct symbol *sym,
+ struct annotate_args *args)