소스 검색

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);
 }