Commit ca31ca82 authored by Vineet Gupta's avatar Vineet Gupta Committed by Alexei Starovoitov

tools/bpf: fix perf build error with uClibc (seen on ARC)

When build perf for ARC recently, there was a build failure due to lack
of __NR_bpf.

| Auto-detecting system features:
|
| ...                     get_cpuid: [ OFF ]
| ...                           bpf: [ on  ]
|
| #  error __NR_bpf not defined. libbpf does not support your arch.
    ^~~~~
| bpf.c: In function 'sys_bpf':
| bpf.c:66:17: error: '__NR_bpf' undeclared (first use in this function)
|  return syscall(__NR_bpf, cmd, attr, size);
|                 ^~~~~~~~
|                 sys_bpf
Signed-off-by: default avatarVineet Gupta <vgupta@synopsys.com>
Acked-by: default avatarYonghong Song <yhs@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent a7d00671
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
# define __NR_bpf 349 # define __NR_bpf 349
# elif defined(__s390__) # elif defined(__s390__)
# define __NR_bpf 351 # define __NR_bpf 351
# elif defined(__arc__)
# define __NR_bpf 280
# else # else
# error __NR_bpf not defined. libbpf does not support your arch. # error __NR_bpf not defined. libbpf does not support your arch.
# endif # endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment