add legacy scsi/scsi_ioctl.h header
[musl] / src / linux / ppoll.c
index 8f4aab9..9e26247 100644 (file)
@@ -1,9 +1,10 @@
 #define _GNU_SOURCE
 #include <poll.h>
+#include <signal.h>
 #include "syscall.h"
 
 int ppoll(struct pollfd *fds, nfds_t n, const struct timespec *to, const sigset_t *mask)
 {
-       struct timespec tmp = *to;
-       return syscall_cp(SYS_ppoll, fds, n, &tmp, mask);
+       return syscall_cp(SYS_ppoll, fds, n,
+               to ? (struct timespec []){*to} : 0, mask, _NSIG/8);
 }