Skip to content

Commit

Permalink
tests: fix pidfd-test compilation
Browse files Browse the repository at this point in the history
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: 575a0ae ("selftests: add tests for pidfd_send_signal()")
Signed-off-by: Christian Brauner <christian@brauner.io>
  • Loading branch information
brauner committed Jun 5, 2019
1 parent c732327 commit 1fcd0eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/testing/selftests/pidfd/pidfd_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 1fcd0eb

Please sign in to comment.