summaryrefslogtreecommitdiff
path: root/tools/perf/util/bpf_map.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2022-10-26 19:50:17 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-10-27 22:37:26 +0300
commitcff624146450bd25a1acea0439b7654167e0f722 (patch)
treef890028af52e0e5a90aaad08e0a239bb25f47b61 /tools/perf/util/bpf_map.h
parenta527c2c1e2d43e9f145f5d0c5d6ac0bdf5220e22 (diff)
downloadlinux-cff624146450bd25a1acea0439b7654167e0f722.tar.xz
perf bpf: No need to include compiler.h when HAVE_LIBBPF_SUPPORT is true
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/bpf_map.h')
-rw-r--r--tools/perf/util/bpf_map.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/bpf_map.h b/tools/perf/util/bpf_map.h
index d6abd5e47af8..c2f7c13cba23 100644
--- a/tools/perf/util/bpf_map.h
+++ b/tools/perf/util/bpf_map.h
@@ -3,7 +3,6 @@
#define __PERF_BPF_MAP_H 1
#include <stdio.h>
-#include <linux/compiler.h>
struct bpf_map;
#ifdef HAVE_LIBBPF_SUPPORT
@@ -12,6 +11,8 @@ int bpf_map__fprintf(struct bpf_map *map, FILE *fp);
#else
+#include <linux/compiler.h>
+
static inline int bpf_map__fprintf(struct bpf_map *map __maybe_unused, FILE *fp __maybe_unused)
{
return 0;