瀏覽代碼

fix ppoll with null timeout argument

Rich Felker 12 年之前
父節點
當前提交
3b5e69052a
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/linux/ppoll.c

+ 2 - 2
src/linux/ppoll.c

@@ -4,6 +4,6 @@
 
 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);
 }