]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
bpf, s390: fix build for libbpf and selftest suite
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 4 Aug 2017 12:20:55 +0000 (14:20 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Aug 2017 18:18:01 +0000 (11:18 -0700)
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 b0c47807d31d ("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>
tools/build/feature/test-bpf.c
tools/lib/bpf/bpf.c

index 7598361ef1f10898ea73d944ae0b0c02c4725d99..da2172ff9662d0e86ffd132b6041b30ea232eb87 100644 (file)
@@ -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
index 256f571f2ab525700c121c94b6a8e866acd79b73..e5bbb090bf88549111f939dcd7c1f500e6f84a4f 100644 (file)
@@ -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