mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-13 15:23:28 -05:00
tools/nolibc/select: drop non-pselect based implementations
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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user