Skip to content

Commit

Permalink
Merge pull request #3501 from ffontaine/master
Browse files Browse the repository at this point in the history
syscall: don't fail if __NR_signalfd is not defined
  • Loading branch information
Christian Brauner committed Jul 28, 2020
2 parents 79c66a2 + 3341e20 commit f3bbb01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/lxc/syscall_numbers.h
Expand Up @@ -228,9 +228,6 @@
#if _MIPS_SIM == _MIPS_SIM_ABI64 /* n64 */
#define __NR_signalfd 5276
#endif
#else
#define -1
#warning "__NR_signalfd not defined for your architecture"
#endif
#endif

Expand Down
2 changes: 2 additions & 0 deletions src/lxc/syscall_wrappers.h
Expand Up @@ -112,8 +112,10 @@ static inline int signalfd(int fd, const sigset_t *mask, int flags)
int retval;

retval = syscall(__NR_signalfd4, fd, mask, _NSIG / 8, flags);
#ifdef __NR_signalfd
if (errno == ENOSYS && flags == 0)
retval = syscall(__NR_signalfd, fd, mask, _NSIG / 8);
#endif

return retval;
}
Expand Down

0 comments on commit f3bbb01

Please sign in to comment.