Commit d6accdd4 authored by Christian Brauner's avatar Christian Brauner Committed by Greg Kroah-Hartman

tests: fix pidfd-test compilation

[ Upstream commit 1fcd0eb3 ]

Define __NR_pidfd_send_signal if it isn't to prevent a potential
compilation error.

To make pidfd-test compile on all arches, irrespective of whether
or not syscall numbers are assigned, define the syscall number to -1.
If it isn't defined this will cause the kernel to return -ENOSYS.

Fixes: 575a0ae9 ("selftests: add tests for pidfd_send_signal()")
Signed-off-by: default avatarChristian Brauner <christian@brauner.io>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4fe18137
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
#include "../kselftest.h" #include "../kselftest.h"
#ifndef __NR_pidfd_send_signal
#define __NR_pidfd_send_signal -1
#endif
static inline int sys_pidfd_send_signal(int pidfd, int sig, siginfo_t *info, static inline int sys_pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
unsigned int flags) unsigned int 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