tools/perf: Fix build without libbfd
authorBen Hutchings <benh@debian.org>
Tue, 5 Jul 2022 16:02:28 +0000 (18:02 +0200)
committerSalvatore Bonaccorso <carnil@debian.org>
Wed, 10 Aug 2022 18:11:48 +0000 (19:11 +0100)
Only include <tools/dis-asm-compat.h> if we are using libbfd.

Signed-off-by: Ben Hutchings <benh@debian.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name tools-perf-fix-build-without-libbfd.patch

tools/perf/util/annotate.c

index daea1867381db2f6659fc91342f9d6d1f30b5117..2c6a485c3de5d9ebf5be2ade40ced867cf6ac7d1 100644 (file)
@@ -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)