Re: [PATCH bpf] tools: bpftool: fix compilation with older headers

2018-03-07 Thread Daniel Borkmann
On 03/06/2018 02:50 PM, Jiri Benc wrote: > 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.

Re: [PATCH bpf] tools: bpftool: fix compilation with older headers

2018-03-06 Thread Arnaldo Carvalho de Melo
[ +ingo, jolsa, namhyung ] Em Tue, Mar 06, 2018 at 05:28:33PM +0100, Daniel Borkmann escreveu: > [ +acme ] > > On 03/06/2018 05:00 PM, David Miller wrote: > > From: Jiri Benc > > Date: Tue, 6 Mar 2018 16:03:25 +0100 > > > >> On Tue, 6 Mar 2018 15:39:07 +0100, Daniel Borkmann wrote: > >>> Thanks

Re: [PATCH bpf] tools: bpftool: fix compilation with older headers

2018-03-06 Thread Daniel Borkmann
[ +acme ] On 03/06/2018 05:00 PM, David Miller wrote: > From: Jiri Benc > Date: Tue, 6 Mar 2018 16:03:25 +0100 > >> On Tue, 6 Mar 2018 15:39:07 +0100, Daniel Borkmann wrote: >>> Thanks for the fix, Jiri! The standard approach to resolve such header >>> dependencies under >>> tools/ would be to

Re: [PATCH bpf] tools: bpftool: fix compilation with older headers

2018-03-06 Thread David Miller
From: Jiri Benc Date: Tue, 6 Mar 2018 16:03:25 +0100 > On Tue, 6 Mar 2018 15:39:07 +0100, Daniel Borkmann wrote: >> Thanks for the fix, Jiri! The standard approach to resolve such header >> dependencies under >> tools/ would be to add a copy of magic.h uapi header into >> tools/include/uapi/lin

Re: [PATCH bpf] tools: bpftool: fix compilation with older headers

2018-03-06 Thread Jiri Benc
On Tue, 6 Mar 2018 15:39:07 +0100, Daniel Borkmann wrote: > Thanks for the fix, Jiri! The standard approach to resolve such header > dependencies under > tools/ would be to add a copy of magic.h uapi header into > tools/include/uapi/linux/magic.h. > > Both bpftool and libbpf have tools/include/u

Re: [PATCH bpf] tools: bpftool: fix compilation with older headers

2018-03-06 Thread Daniel Borkmann
On 03/06/2018 02:50 PM, Jiri Benc wrote: > 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.