diff options
author | Christian Brauner | 2019-06-05 15:06:32 +0200 |
---|---|---|
committer | Christian Brauner | 2019-06-05 15:06:32 +0200 |
commit | 1fcd0eb356ad56c4e405f06e31dd9fde2109d5ab (patch) | |
tree | 9875ba966c5b62651c1bb1a42b96efe453897cf9 /tools | |
parent | c732327f04a3818f35fa97d07b1d64d31b691d78 (diff) |
tests: fix pidfd-test compilation
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: 575a0ae9744d ("selftests: add tests for pidfd_send_signal()")
Signed-off-by: Christian Brauner <christian@brauner.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/pidfd/pidfd_test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/pidfd/pidfd_test.c b/tools/testing/selftests/pidfd/pidfd_test.c index 5bae1792e3d6..104c75a33882 100644 --- a/tools/testing/selftests/pidfd/pidfd_test.c +++ b/tools/testing/selftests/pidfd/pidfd_test.c @@ -16,6 +16,10 @@ #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, unsigned int flags) { |