summaryrefslogtreecommitdiff
path: root/lib/libc/select/select.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/select/select.c')
-rw-r--r--lib/libc/select/select.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libc/select/select.c b/lib/libc/select/select.c
new file mode 100644
index 00000000..4e9f2f99
--- /dev/null
+++ b/lib/libc/select/select.c
@@ -0,0 +1,9 @@
+#include <sys/select.h>
+#include <syscall.h>
+
+int select(int nfds, fd_set *restrict readfds, fd_set *restrict writefds,
+ fd_set *restrict errorfds, struct timeval *restrict timeout)
+{
+ return syscall(pselect6, nfds, readfds, writefds, errorfds, timeout,
+ ((syscall_arg_t[]){ 0, 8 }));
+}