]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tests: fix pidfd-test compilation
authorChristian Brauner <christian@brauner.io>
Wed, 5 Jun 2019 13:06:32 +0000 (15:06 +0200)
committerChristian Brauner <christian@brauner.io>
Wed, 5 Jun 2019 13:06:32 +0000 (15:06 +0200)
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>
tools/testing/selftests/pidfd/pidfd_test.c

index 5bae1792e3d6372570e60c733506c2df9ea0ab50..104c75a33882c9538af0e0c61ecd92a81f4fdba6 100644 (file)
 
 #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)
 {