about summary refs log tree commit diff
path: root/src/linux/signalfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/linux/signalfd.c')
-rw-r--r--src/linux/signalfd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/linux/signalfd.c b/src/linux/signalfd.c
index da6bcedb..4bf43326 100644
--- a/src/linux/signalfd.c
+++ b/src/linux/signalfd.c
@@ -7,6 +7,7 @@
 int signalfd(int fd, const sigset_t *sigs, int flags)
 {
 	int ret = __syscall(SYS_signalfd4, fd, sigs, _NSIG/8, flags);
+#ifdef SYS_signalfd
 	if (ret != -ENOSYS) return __syscall_ret(ret);
 	ret = __syscall(SYS_signalfd, fd, sigs, _NSIG/8);
 	if (ret >= 0) {
@@ -15,5 +16,6 @@ int signalfd(int fd, const sigset_t *sigs, int flags)
 		if (flags & SFD_NONBLOCK)
 			__syscall(SYS_fcntl, ret, F_SETFL, O_NONBLOCK);
 	}
+#endif
 	return __syscall_ret(ret);
 }