musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rw-r--r--src/select/select.c 3
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 }));
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月05日 14:34:44 +0000

AltStyle によって変換されたページ (->オリジナル) /