diff options
author | Vineet Gupta <Vineet.Gupta1@synopsys.com> | 2019-05-02 11:56:50 -0400 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-05-05 03:04:01 -0400 |
commit | ca31ca8247e2d3807ff5fa1d1760616a2292001c (patch) | |
tree | 54cddd6c68b502129ee8d7873625b6a7e3d084eb | |
parent | a7d006714724de4334c5e3548701b33f7b12ca96 (diff) |
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: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
-rw-r--r-- | tools/lib/bpf/bpf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c index 955191c64b64..c4a48086dc9a 100644 --- a/tools/lib/bpf/bpf.c +++ b/tools/lib/bpf/bpf.c | |||
@@ -46,6 +46,8 @@ | |||
46 | # define __NR_bpf 349 | 46 | # define __NR_bpf 349 |
47 | # elif defined(__s390__) | 47 | # elif defined(__s390__) |
48 | # define __NR_bpf 351 | 48 | # define __NR_bpf 351 |
49 | # elif defined(__arc__) | ||
50 | # define __NR_bpf 280 | ||
49 | # else | 51 | # else |
50 | # error __NR_bpf not defined. libbpf does not support your arch. | 52 | # error __NR_bpf not defined. libbpf does not support your arch. |
51 | # endif | 53 | # endif |