bpf: Remove bpf_sys.h from selftests
Add require dependency headers. Signed-off-by: Mickaël Salaün <mic@digikod.net> Cc: Alexei Starovoitov <ast@fb.com> Cc: Daniel Borkmann <daniel@iogearbox.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
f4874d01be
commit
702498a142
@@ -50,7 +50,13 @@ static __u64 ptr_to_u64(const void *ptr)
|
||||
static int sys_bpf(enum bpf_cmd cmd, union bpf_attr *attr,
|
||||
unsigned int size)
|
||||
{
|
||||
#ifdef __NR_bpf
|
||||
return syscall(__NR_bpf, cmd, attr, size);
|
||||
#else
|
||||
fprintf(stderr, "No bpf syscall, kernel headers too old?\n");
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
int bpf_create_map(enum bpf_map_type map_type, int key_size,
|
||||
|
Reference in New Issue
Block a user