Skip to content

Commit bad1926

Browse files
borkmanndavem330
authored andcommitted
bpf, s390: fix build for libbpf and selftest suite
The BPF feature test as well as libbpf is missing the __NR_bpf define for s390 and currently refuses to compile (selftest suite depends on libbpf as well). Similar issue was fixed some time ago via b0c4780 ("bpf: Add sparc support to tools and samples."), just do the same and add definitions. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b0a0c25 commit bad1926

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tools/build/feature/test-bpf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# define __NR_bpf 280
1212
# elif defined(__sparc__)
1313
# define __NR_bpf 349
14+
# elif defined(__s390__)
15+
# define __NR_bpf 351
1416
# else
1517
# error __NR_bpf not defined. libbpf does not support your arch.
1618
# endif

tools/lib/bpf/bpf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
# define __NR_bpf 280
4040
# elif defined(__sparc__)
4141
# define __NR_bpf 349
42+
# elif defined(__s390__)
43+
# define __NR_bpf 351
4244
# else
4345
# error __NR_bpf not defined. libbpf does not support your arch.
4446
# endif

0 commit comments

Comments
 (0)