cgroup.c in bpftool source code is defining _XOPEN_SOURCE 500, which, apparently, makes syscall() unavailable. Which is a problem now that libbpf exposes syscal()-usign bpf() API in bpf.h. Fix by defining _GNU_SOURCE instead, which enables syscall() wrapper. Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx> --- tools/bpf/bpftool/cgroup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/bpf/bpftool/cgroup.c b/tools/bpf/bpftool/cgroup.c index 3571a281c43f..4876364e753d 100644 --- a/tools/bpf/bpftool/cgroup.c +++ b/tools/bpf/bpftool/cgroup.c @@ -2,7 +2,7 @@ // Copyright (C) 2017 Facebook // Author: Roman Gushchin <guro@xxxxxx> -#define _XOPEN_SOURCE 500 +#define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <ftw.h> -- 2.30.2