aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/bpf-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/bpf-utils.h')
-rw-r--r--tools/perf/util/bpf-utils.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/bpf-utils.h b/tools/perf/util/bpf-utils.h
index 86a5055cdfad..eafc43b8731f 100644
--- a/tools/perf/util/bpf-utils.h
+++ b/tools/perf/util/bpf-utils.h
@@ -8,6 +8,11 @@
#ifdef HAVE_LIBBPF_SUPPORT
#include <bpf/libbpf.h>
+#include <bpf/libbpf_version.h>
+
+#define LIBBPF_CURRENT_VERSION_GEQ(major, minor) \
+ (LIBBPF_MAJOR_VERSION > (major) || \
+ (LIBBPF_MAJOR_VERSION == (major) && LIBBPF_MINOR_VERSION >= (minor)))
/*
* Get bpf_prog_info in continuous memory