Skip to content

Commit

Permalink
bpf, s390: fix build for libbpf and selftest suite
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
borkmann authored and davem330 committed Aug 4, 2017
1 parent b0a0c25 commit bad1926
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/build/feature/test-bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# define __NR_bpf 280
# elif defined(__sparc__)
# define __NR_bpf 349
# elif defined(__s390__)
# define __NR_bpf 351
# else
# error __NR_bpf not defined. libbpf does not support your arch.
# endif
Expand Down
2 changes: 2 additions & 0 deletions tools/lib/bpf/bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
# define __NR_bpf 280
# elif defined(__sparc__)
# define __NR_bpf 349
# elif defined(__s390__)
# define __NR_bpf 351
# else
# error __NR_bpf not defined. libbpf does not support your arch.
# endif
Expand Down

0 comments on commit bad1926

Please sign in to comment.