]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/nolibc/select: drop non-pselect based implementations
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 20 Dec 2025 13:55:47 +0000 (14:55 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Sun, 4 Jan 2026 09:28:58 +0000 (10:28 +0100)
These implementations use the libc 'struct timeval' with system calls
which can lead to type mismatches. Currently this is fine, but will
break with upcoming changes to 'struct timeval'.

If the structure needs to be converted anyways, the implementations
based on pselect can be used for all architectures. This simplifies the
logic.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20251220-nolibc-uapi-types-v3-3-c662992f75d7@weissschuh.net
tools/include/nolibc/sys/select.h

index 9a29e5b98a3cef0e9096b273a24275913f711088..50b77dace7effabb1f66cfcf6fd10fe7979224ec 100644 (file)
@@ -63,18 +63,7 @@ typedef struct {
 static __attribute__((unused))
 int sys_select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout)
 {
-#if defined(__ARCH_WANT_SYS_OLD_SELECT) && !defined(__NR__newselect)
-       struct sel_arg_struct {
-               unsigned long n;
-               fd_set *r, *w, *e;
-               struct timeval *t;
-       } arg = { .n = nfds, .r = rfds, .w = wfds, .e = efds, .t = timeout };
-       return my_syscall1(__NR_select, &arg);
-#elif defined(__NR__newselect)
-       return my_syscall5(__NR__newselect, nfds, rfds, wfds, efds, timeout);
-#elif defined(__NR_select)
-       return my_syscall5(__NR_select, nfds, rfds, wfds, efds, timeout);
-#elif defined(__NR_pselect6)
+#if defined(__NR_pselect6)
        struct __kernel_old_timespec t;
 
        if (timeout) {