mirror of
https://github.com/torvalds/linux.git
synced 2026-03-14 00:56:20 +01:00
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: Sergei Iudin <siudin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
4170bc6baa
commit
f055f355fa
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue