about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/select/select.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/select/select.c b/src/select/select.c
index e84c887f..8a786884 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -35,7 +35,8 @@ int select(int n, fd_set *restrict rfds, fd_set *restrict wfds, fd_set *restrict
 		return __syscall_ret(r);
 #endif
 #ifdef SYS_select
-	return syscall_cp(SYS_select, n, rfds, wfds, efds, ((long[]){s, us}));
+	return syscall_cp(SYS_select, n, rfds, wfds, efds,
+		tv ? ((long[]){s, us}) : 0);
 #else
 	return syscall_cp(SYS_pselect6, n, rfds, wfds, efds,
 		tv ? ((long[]){s, ns}) : 0, ((syscall_arg_t[]){ 0, _NSIG/8 }));