diff --git a/nptl/futex-internal.c b/nptl/futex-internal.c index 5a64d14338..e9fb108111 100644 --- a/nptl/futex-internal.c +++ b/nptl/futex-internal.c @@ -54,13 +54,9 @@ __futex_abstimed_wait_common64 (unsigned int* futex_word, int private, bool cancel) { if (cancel) - return INTERNAL_SYSCALL_CANCEL (futex_time64, futex_word, op, expected, - abstime, NULL /* Unused. */, - FUTEX_BITSET_MATCH_ANY); + return -ENOSYS; // INTERNAL_SYSCALL_CANCEL (futex_time64, futex_word, op, expected, abstime, NULL /* Unused. */, FUTEX_BITSET_MATCH_ANY); else - return INTERNAL_SYSCALL_CALL (futex_time64, futex_word, op, expected, - abstime, NULL /* Unused. */, - FUTEX_BITSET_MATCH_ANY); + return -ENOSYS; // INTERNAL_SYSCALL_CALL (futex_time64, futex_word, op, expected, abstime, NULL /* Unused. */, FUTEX_BITSET_MATCH_ANY); } static int diff --git a/sysdeps/unix/sysv/linux/clock_adjtime.c b/sysdeps/unix/sysv/linux/clock_adjtime.c index bd6663431c..fd771e9ad5 100644 --- a/sysdeps/unix/sysv/linux/clock_adjtime.c +++ b/sysdeps/unix/sysv/linux/clock_adjtime.c @@ -29,7 +29,8 @@ __clock_adjtime64 (const clockid_t clock_id, struct __timex64 *tx64) #ifndef __NR_clock_adjtime64 # define __NR_clock_adjtime64 __NR_clock_adjtime #endif - int r = INLINE_SYSCALL_CALL (clock_adjtime64, clock_id, tx64); + int r = -1; // INLINE_SYSCALL_CALL (clock_adjtime64, clock_id, tx64); + errno = ENOSYS; #ifndef __ASSUME_TIME64_SYSCALLS if (r >= 0 || errno != ENOSYS) return r; diff --git a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c index 5f01225542..ae1e9abc0b 100644 --- a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c +++ b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c @@ -34,7 +34,7 @@ __clock_getcpuclockid (pid_t pid, clockid_t *clock_id) #ifndef __NR_clock_getres_time64 # define __NR_clock_getres_time64 __NR_clock_getres #endif - int r = INTERNAL_SYSCALL_CALL (clock_getres_time64, pidclock, NULL); + int r = -ENOSYS; // INTERNAL_SYSCALL_CALL (clock_getres_time64, pidclock, NULL); #ifndef __ASSUME_TIME64_SYSCALLS if (r != 0 && r == -ENOSYS) diff --git a/sysdeps/unix/sysv/linux/clock_getres.c b/sysdeps/unix/sysv/linux/clock_getres.c index da2cb90f5c..39ee38a078 100644 --- a/sysdeps/unix/sysv/linux/clock_getres.c +++ b/sysdeps/unix/sysv/linux/clock_getres.c @@ -35,9 +35,9 @@ __clock_getres64 (clockid_t clock_id, struct __timespec64 *res) #endif #ifdef HAVE_CLOCK_GETRES64_VSYSCALL - r = INLINE_VSYSCALL (clock_getres_time64, 2, clock_id, res); + r = ENOSYS; // INLINE_VSYSCALL (clock_getres_time64, 2, clock_id, res); #else - r = INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res); + r = ENOSYS; // INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res); #endif if (r == 0 || errno != ENOSYS) return r; diff --git a/sysdeps/unix/sysv/linux/clock_nanosleep.c b/sysdeps/unix/sysv/linux/clock_nanosleep.c index ac2d810632..12c1c976f5 100644 --- a/sysdeps/unix/sysv/linux/clock_nanosleep.c +++ b/sysdeps/unix/sysv/linux/clock_nanosleep.c @@ -50,8 +50,7 @@ __clock_nanosleep_time64 (clockid_t clock_id, int flags, #else if (!in_int32_t_range (req->tv_sec)) { - r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, clock_id, flags, - req, rem); + r = -ENOSYS; // INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, clock_id, flags, req, rem); if (r == -ENOSYS) r = -EOVERFLOW; } diff --git a/sysdeps/unix/sysv/linux/clock_settime.c b/sysdeps/unix/sysv/linux/clock_settime.c index 68e8b0ce12..26e1e75a35 100644 --- a/sysdeps/unix/sysv/linux/clock_settime.c +++ b/sysdeps/unix/sysv/linux/clock_settime.c @@ -35,7 +35,8 @@ __clock_settime64 (clockid_t clock_id, const struct __timespec64 *tp) #ifndef __NR_clock_settime64 # define __NR_clock_settime64 __NR_clock_settime #endif - int ret = INLINE_SYSCALL_CALL (clock_settime64, clock_id, tp); + int ret = -1; // INLINE_SYSCALL_CALL (clock_settime64, clock_id, tp); + errno = ENOSYS; #ifndef __ASSUME_TIME64_SYSCALLS if (ret == 0 || errno != ENOSYS) diff --git a/sysdeps/unix/sysv/linux/faccessat.c b/sysdeps/unix/sysv/linux/faccessat.c index 0ccbd778b5..f373741afe 100644 --- a/sysdeps/unix/sysv/linux/faccessat.c +++ b/sysdeps/unix/sysv/linux/faccessat.c @@ -26,7 +26,8 @@ int __faccessat (int fd, const char *file, int mode, int flag) { - int ret = INLINE_SYSCALL_CALL (faccessat2, fd, file, mode, flag); + int ret = -1; // INLINE_SYSCALL_CALL (faccessat2, fd, file, mode, flag); + errno = ENOSYS; #if __ASSUME_FACCESSAT2 return ret; #else diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 07b440f4ee..3be0f500a4 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -210,7 +210,7 @@ #if __LINUX_KERNEL_VERSION >= 0x050100 \ || __WORDSIZE == 64 \ || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) -# define __ASSUME_TIME64_SYSCALLS 1 +# define NO_ASSUME_TIME64_SYSCALLS 1 #endif /* Linux waitid prior kernel 5.4 does not support waiting for the current @@ -222,7 +222,7 @@ /* The faccessat2 system call was introduced across all architectures in Linux 5.8. */ #if __LINUX_KERNEL_VERSION >= 0x050800 -# define __ASSUME_FACCESSAT2 1 +# define __ASSUME_FACCESSAT2 0 #else # define __ASSUME_FACCESSAT2 0 #endif diff --git a/sysdeps/unix/sysv/linux/mq_timedreceive.c b/sysdeps/unix/sysv/linux/mq_timedreceive.c index 6391e0026b..89815deb5d 100644 --- a/sysdeps/unix/sysv/linux/mq_timedreceive.c +++ b/sysdeps/unix/sysv/linux/mq_timedreceive.c @@ -39,8 +39,8 @@ ___mq_timedreceive_time64 (mqd_t mqdes, char *__restrict msg_ptr, size_t msg_len && !in_int32_t_range (abs_timeout->tv_sec); if (need_time64) { - int r = SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len, - msg_prio, abs_timeout); + int r = -1; // SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len, msg_prio, abs_timeout); + errno = ENOSYS; if (r >= 0 || errno != ENOSYS) return r; __set_errno (EOVERFLOW); diff --git a/sysdeps/unix/sysv/linux/mq_timedsend.c b/sysdeps/unix/sysv/linux/mq_timedsend.c index 40d475a141..b7d19f6b7a 100644 --- a/sysdeps/unix/sysv/linux/mq_timedsend.c +++ b/sysdeps/unix/sysv/linux/mq_timedsend.c @@ -39,8 +39,8 @@ ___mq_timedsend_time64 (mqd_t mqdes, const char *msg_ptr, size_t msg_len, && !in_int32_t_range (abs_timeout->tv_sec); if (need_time64) { - int r = SYSCALL_CANCEL (mq_timedsend_time64, mqdes, msg_ptr, msg_len, - msg_prio, abs_timeout); + int r = -1; // SYSCALL_CANCEL (mq_timedsend_time64, mqdes, msg_ptr, msg_len, msg_prio, abs_timeout); + errno = ENOSYS; if (r == 0 || errno != ENOSYS) return r; __set_errno (EOVERFLOW); diff --git a/sysdeps/unix/sysv/linux/ppoll.c b/sysdeps/unix/sysv/linux/ppoll.c index 078eba3031..3f27c3d485 100644 --- a/sysdeps/unix/sysv/linux/ppoll.c +++ b/sysdeps/unix/sysv/linux/ppoll.c @@ -46,8 +46,8 @@ __ppoll64 (struct pollfd *fds, nfds_t nfds, const struct __timespec64 *timeout, bool need_time64 = timeout != NULL && !in_int32_t_range (timeout->tv_sec); if (need_time64) { - ret = SYSCALL_CANCEL (ppoll_time64, fds, nfds, timeout, sigmask, - __NSIG_BYTES); + ret = -1; // SYSCALL_CANCEL (ppoll_time64, fds, nfds, timeout, sigmask, __NSIG_BYTES); + errno = ENOSYS; if (ret == 0 || errno != ENOSYS) return ret; __set_errno (EOVERFLOW); diff --git a/sysdeps/unix/sysv/linux/pselect.c b/sysdeps/unix/sysv/linux/pselect.c index 7fab25c19e..54ad5d0364 100644 --- a/sysdeps/unix/sysv/linux/pselect.c +++ b/sysdeps/unix/sysv/linux/pselect.c @@ -59,8 +59,8 @@ __pselect64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, bool need_time64 = timeout != NULL && !in_int32_t_range (timeout->tv_sec); if (need_time64) { - int r = pselect64_syscall (nfds, readfds, writefds, exceptfds, timeout, - sigmask); + int r = -1; // pselect64_syscall (nfds, readfds, writefds, exceptfds, timeout, sigmask); + errno = ENOSYS; if (r == 0 || errno != ENOSYS) return r; __set_errno (EOVERFLOW); diff --git a/sysdeps/unix/sysv/linux/recvmmsg.c b/sysdeps/unix/sysv/linux/recvmmsg.c index e3561f2f60..8c14128869 100644 --- a/sysdeps/unix/sysv/linux/recvmmsg.c +++ b/sysdeps/unix/sysv/linux/recvmmsg.c @@ -26,8 +26,8 @@ recvmmsg_syscall (int fd, struct mmsghdr *vmessages, unsigned int vlen, #ifndef __NR_recvmmsg_time64 # define __NR_recvmmsg_time64 __NR_recvmmsg #endif - int r = SYSCALL_CANCEL (recvmmsg_time64, fd, vmessages, vlen, flags, - timeout); + int r = -1; // SYSCALL_CANCEL (recvmmsg_time64, fd, vmessages, vlen, flags, timeout); + errno = ENOSYS; #ifndef __ASSUME_TIME64_SYSCALLS if (r >= 0 || errno != ENOSYS) return r; diff --git a/sysdeps/unix/sysv/linux/sched_rr_gi.c b/sysdeps/unix/sysv/linux/sched_rr_gi.c index 0f725cafc8..4a7b5eb0d6 100644 --- a/sysdeps/unix/sysv/linux/sched_rr_gi.c +++ b/sysdeps/unix/sysv/linux/sched_rr_gi.c @@ -28,7 +28,8 @@ __sched_rr_get_interval64 (pid_t pid, struct __timespec64 *tp) #ifndef __NR_sched_rr_get_interval_time64 # define __NR_sched_rr_get_interval_time64 __NR_sched_rr_get_interval #endif - int ret = INLINE_SYSCALL_CALL (sched_rr_get_interval_time64, pid, tp); + int ret = -1; // INLINE_SYSCALL_CALL (sched_rr_get_interval_time64, pid, tp); + errno = ENOSYS; #ifndef __ASSUME_TIME64_SYSCALLS if (ret == 0 || errno != ENOSYS) return ret; diff --git a/sysdeps/unix/sysv/linux/select.c b/sysdeps/unix/sysv/linux/select.c index 556165c11c..976ca7d0fd 100644 --- a/sysdeps/unix/sysv/linux/select.c +++ b/sysdeps/unix/sysv/linux/select.c @@ -75,8 +75,8 @@ __select64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, bool need_time64 = timeout != NULL && !in_int32_t_range (timeout->tv_sec); if (need_time64) { - int r = SYSCALL_CANCEL (pselect6_time64, nfds, readfds, writefds, - exceptfds, pts64, NULL); + int r = -1; // SYSCALL_CANCEL (pselect6_time64, nfds, readfds, writefds, exceptfds, pts64, NULL); + errno = ENOSYS; if ((r >= 0 || errno != ENOSYS) && timeout != NULL) { TIMESPEC_TO_TIMEVAL (timeout, &ts64); diff --git a/sysdeps/unix/sysv/linux/semtimedop.c b/sysdeps/unix/sysv/linux/semtimedop.c index 4cff1f982a..9fa0300add 100644 --- a/sysdeps/unix/sysv/linux/semtimedop.c +++ b/sysdeps/unix/sysv/linux/semtimedop.c @@ -45,7 +45,8 @@ __semtimedop64 (int semid, struct sembuf *sops, size_t nsops, bool need_time64 = timeout != NULL && !in_int32_t_range (timeout->tv_sec); if (need_time64) { - int r = semtimedop_syscall (semid, sops, nsops, timeout); + int r = -1; // semtimedop_syscall (semid, sops, nsops, timeout); + errno = ENOSYS; if (r == 0 || errno != ENOSYS) return r; __set_errno (EOVERFLOW); diff --git a/sysdeps/unix/sysv/linux/timer_gettime.c b/sysdeps/unix/sysv/linux/timer_gettime.c index 091a03ef36..b965c94457 100644 --- a/sysdeps/unix/sysv/linux/timer_gettime.c +++ b/sysdeps/unix/sysv/linux/timer_gettime.c @@ -32,7 +32,8 @@ ___timer_gettime64 (timer_t timerid, struct __itimerspec64 *value) # ifndef __NR_timer_gettime64 # define __NR_timer_gettime64 __NR_timer_gettime # endif - int ret = INLINE_SYSCALL_CALL (timer_gettime64, ktimerid, value); + int ret = -1; // INLINE_SYSCALL_CALL (timer_gettime64, ktimerid, value); + errno = ENOSYS; # ifndef __ASSUME_TIME64_SYSCALLS if (ret == 0 || errno != ENOSYS) return ret; diff --git a/sysdeps/unix/sysv/linux/timer_settime.c b/sysdeps/unix/sysv/linux/timer_settime.c index 148eb4c0f2..ecb9bf99e9 100644 --- a/sysdeps/unix/sysv/linux/timer_settime.c +++ b/sysdeps/unix/sysv/linux/timer_settime.c @@ -39,8 +39,7 @@ ___timer_settime64 (timer_t timerid, int flags, ovalue); # else # ifdef __NR_timer_settime64 - int ret = INLINE_SYSCALL_CALL (timer_settime64, ktimerid, flags, value, - ovalue); + int ret = ENOSYS; // INLINE_SYSCALL_CALL (timer_settime64, ktimerid, flags, value, ovalue); if (ret == 0 || errno != ENOSYS) return ret; # endif diff --git a/sysdeps/unix/sysv/linux/timerfd_gettime.c b/sysdeps/unix/sysv/linux/timerfd_gettime.c index 2c8db1003d..9c3683bea9 100644 --- a/sysdeps/unix/sysv/linux/timerfd_gettime.c +++ b/sysdeps/unix/sysv/linux/timerfd_gettime.c @@ -32,7 +32,8 @@ __timerfd_gettime64 (int fd, struct __itimerspec64 *value) #ifdef __ASSUME_TIME64_SYSCALLS return INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value); #else - int ret = INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value); + int ret = -1; // INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value); + errno = ENOSYS; if (ret == 0 || errno != ENOSYS) return ret; struct itimerspec its32; diff --git a/sysdeps/unix/sysv/linux/timerfd_settime.c b/sysdeps/unix/sysv/linux/timerfd_settime.c index 4f6148ea30..ab7eb0b568 100644 --- a/sysdeps/unix/sysv/linux/timerfd_settime.c +++ b/sysdeps/unix/sysv/linux/timerfd_settime.c @@ -37,8 +37,8 @@ __timerfd_settime64 (int fd, int flags, const struct __itimerspec64 *value, || !in_int32_t_range (value->it_interval.tv_sec); if (need_time64) { - int r = INLINE_SYSCALL_CALL (timerfd_settime64, fd, flags, value, - ovalue); + int r = -1; // INLINE_SYSCALL_CALL (timerfd_settime64, fd, flags, value, ovalue); + errno = ENOSYS; if (r == 0 || errno != ENOSYS) return r; __set_errno (EOVERFLOW); diff --git a/sysdeps/unix/sysv/linux/utimensat.c b/sysdeps/unix/sysv/linux/utimensat.c index 6075e1e006..8b931cdc35 100644 --- a/sysdeps/unix/sysv/linux/utimensat.c +++ b/sysdeps/unix/sysv/linux/utimensat.c @@ -46,8 +46,8 @@ __utimensat64_helper (int fd, const char *file, && !in_int32_t_range (tsp64[1].tv_sec))); if (need_time64) { - int r = INLINE_SYSCALL_CALL (utimensat_time64, fd, file, &tsp64[0], - flags); + int r = -1; // INLINE_SYSCALL_CALL (utimensat_time64, fd, file, &tsp64[0], flags); + errno = ENOSYS; if (r == 0 || errno != ENOSYS) return r; __set_errno (EOVERFLOW);