From a92f4e6299fe0e3cb6f77e79de00817aece501ce Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 6 Jul 2020 13:27:12 -0300 Subject: linux: Add time64 pselect support The syscall __NR_pselect6_time64 (32-bit) or __NR_pselect6 (64-bit) is used as default. For architectures with __ASSUME_TIME64_SYSCALLS the 32-bit fallback uses __NR_pselec6. To accomodate microblaze missing pselect6 support on kernel older than 3.15 the fallback is moved to its own function to the microblaze specific implementation can override it. Checked on x86_64-linux-gnu and i686-linux-gnu (on 5.4 and on 4.15 kernel). Reviewed-by: Alistair Francis --- include/sys/select.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/sys/select.h') diff --git a/include/sys/select.h b/include/sys/select.h index 07bb49b..b5ae9af 100644 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -3,6 +3,22 @@ #ifndef _ISOMAC /* Now define the internal interfaces. */ +# if __TIMESIZE == 64 +# define __pselect64 __pselect +#else +# include +extern int __pselect64 (int __nfds, fd_set *__readfds, + fd_set *__writefds, fd_set *__exceptfds, + const struct __timespec64 *__timeout, + const __sigset_t *__sigmask); +libc_hidden_proto (__pselect64) + +extern int __pselect32 (int __nfds, fd_set *__readfds, + fd_set *__writefds, fd_set *__exceptfds, + const struct __timespec64 *__timeout, + const __sigset_t *__sigmask) + attribute_hidden; +#endif extern int __pselect (int __nfds, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, const struct timespec *__timeout, -- cgit v1.1