mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 22:34:33 +01:00
libbpf 1.0 represented a cleanup and stabilization of APIs. Simplify development by only passing the feature test if libbpf 1.0 is installed. Committer notes: Change 'make -C tools/perf build-test' so that the LIBBPF_DYNAMIC=1 test runs only if libbpf is >= 1.0. Signed-off-by: Ian Rogers <[email protected]> Tested-by: Jiri Olsa <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Andres Freund <[email protected]> Cc: Andrii Nakryiko <[email protected]> Cc: Christy Lee <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Quentin Monnet <[email protected]> Cc: Roberto Sassu <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
12 lines
252 B
C
12 lines
252 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <bpf/libbpf.h>
|
|
|
|
#if !defined(LIBBPF_MAJOR_VERSION) || (LIBBPF_MAJOR_VERSION < 1)
|
|
#error At least libbpf 1.0 is required for Linux tools.
|
|
#endif
|
|
|
|
int main(void)
|
|
{
|
|
return bpf_object__open("test") ? 0 : -1;
|
|
}
|