]> git.baikalelectronics.ru Git - kernel.git/commit
tools: bpftool: fix compilation with older headers
authorJiri Benc <jbenc@redhat.com>
Tue, 6 Mar 2018 13:50:10 +0000 (14:50 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 6 Mar 2018 21:51:00 +0000 (22:51 +0100)
commit89ec3c592104ae668a49af94a7eee65424acea46
tree542a78539cf96938f8dc3c8625b46e9c1e775ba5
parentff2ca95de4403d762290ec034a7784f4d4497fcf
tools: bpftool: fix compilation with older headers

Compilation of bpftool on a distro that lacks eBPF support in the installed
kernel headers fails with:

common.c: In function ‘is_bpffs’:
common.c:96:40: error: ‘BPF_FS_MAGIC’ undeclared (first use in this function)
  return (unsigned long)st_fs.f_type == BPF_FS_MAGIC;
                                        ^
Fix this the same way it is already in tools/lib/bpf/libbpf.c and
tools/lib/api/fs/fs.c.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/bpf/bpftool/common.c