summaryrefslogtreecommitdiff
path: root/tools/build
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2022-05-24 14:06:12 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2022-05-26 11:02:02 -0300
commit73534617dfa3c4cd95fe5ffaeff5315e9ffc2de6 (patch)
tree302a188fad55f78bcffa0a024da65a67e55ef4a5 /tools/build
parentbabf0bb978e3c9fce6c4eba6b744c8754fd43d8e (diff)
perf build: Fix btf__load_from_kernel_by_id() feature check
The btf__load_from_kernel_by_id() only takes one arg, not two. Committer notes: I tested it just with an older libbpf, one where btf__load_from_kernel_by_id() wasn't introduced yet. A test with a newer dynamic libbpf would fail because the btf__load_from_kernel_by_id() is there, but takes just one arg. Fixes: 0ae065a5d265bc5a ("perf build: Fix check for btf__load_from_kernel_by_id() in libbpf") Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Ian Rogers <irogers@google.com> Cc: Ilya Leoshkevich <iii@linux.ibm.com> Cc: Sumanth Korikkar <sumanthk@linux.ibm.com> Cc: Sven Schnelle <svens@linux.ibm.com> Cc: Thomas Richter <tmricht@linux.ibm.com> Cc: Vasily Gorbik <gor@linux.ibm.com> Link: http://lore.kernel.org/linux-perf-users/YozLKby7ITEtchC9@krava Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/build')
-rw-r--r--tools/build/feature/test-libbpf-btf__load_from_kernel_by_id.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/build/feature/test-libbpf-btf__load_from_kernel_by_id.c b/tools/build/feature/test-libbpf-btf__load_from_kernel_by_id.c
index f7c084428735..a17647f7d5a4 100644
--- a/tools/build/feature/test-libbpf-btf__load_from_kernel_by_id.c
+++ b/tools/build/feature/test-libbpf-btf__load_from_kernel_by_id.c
@@ -1,7 +1,8 @@
// SPDX-License-Identifier: GPL-2.0
-#include <bpf/libbpf.h>
+#include <bpf/btf.h>
int main(void)
{
- return btf__load_from_kernel_by_id(20151128, NULL);
+ btf__load_from_kernel_by_id(20151128);
+ return 0;
}