aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2023-01-14 02:10:01 +0100
committerBen Hutchings <ben@decadent.org.uk>2023-02-12 22:10:18 +0100
commitdf8acc6168d9abd9dee5c2eb6b9e6a25311676bc (patch)
tree1224e92d4bb1f195f36df3f69b7f7880e063bae7
parent0743d8d14da1086bc903159cec4504c7cef756c3 (diff)
downloadklibc-df8acc6168d9abd9dee5c2eb6b9e6a25311676bc.tar.gz
[klibc] select: Make all select calls wrappers for pselect6()
select() and pselect() don't have direct replacements that use 64-bit time on 32-bit architectures. Instead, we have to use the pselect6() system call which uses a different buffer structure. In preparation for using 64-bit time everywhere: - Make pselect6() a required system call - Make select() and pselect() wrappers for pselect6() Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--usr/klibc/SYSCALLS.def1
-rw-r--r--usr/klibc/select.c4
2 files changed, 0 insertions, 5 deletions
diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def
index 6d01c176b62ab8..ad8eefa45bf2e4 100644
--- a/usr/klibc/SYSCALLS.def
+++ b/usr/klibc/SYSCALLS.def
@@ -165,7 +165,6 @@ int dup3(int, int, int);
<!i386,ppc64> int fcntl64,fcntl::fcntl(int, int, unsigned long);
int ioctl(int, int, void *);
int flock(int, int);
-<?> int _newselect,select::select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
int pselect6::__pselect6(int, fd_set *, fd_set *, fd_set *, struct timespec *, const struct __pselect6 *);
<?> int poll(struct pollfd *, nfds_t, long);
<?> int ppoll::__ppoll(struct pollfd *, nfds_t, struct timespec *, const sigset_t *, size_t);
diff --git a/usr/klibc/select.c b/usr/klibc/select.c
index 8ad93a4b68e74d..11e7154307fab6 100644
--- a/usr/klibc/select.c
+++ b/usr/klibc/select.c
@@ -4,8 +4,6 @@
#include <errno.h>
#include <sys/syscall.h>
-#if !defined(__NR_select) && !defined(__NR__newselect)
-
struct __pselect6;
__extern int __pselect6(int, fd_set *, fd_set *, fd_set *,
const struct timespec *, const struct __pselect6 *);
@@ -31,5 +29,3 @@ int select(int nfds, fd_set *readfds, fd_set *writefds,
return result;
}
-
-#endif