Commit f055f355 authored by Alexei Starovoitov's avatar Alexei Starovoitov

selftests/bpf: Fix selftest build with old libc

pidfd_open was added in 2019. Some versions of libc library don't define it.
Define it manually if it's not available.
Reported-by: default avatarSergei Iudin <siudin@fb.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 4170bc6b
......@@ -12,6 +12,10 @@
#include "local_storage.skel.h"
#include "network_helpers.h"
#ifndef __NR_pidfd_open
#define __NR_pidfd_open 434
#endif
static inline int sys_pidfd_open(pid_t pid, unsigned int flags)
{
return syscall(__NR_pidfd_open, pid, flags);
......
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