From 1c0a497a3f986bc6980581c9eab482ccf7bb190f Mon Sep 17 00:00:00 2001 From: Matheus Castanho Date: Wed, 30 Sep 2020 14:22:18 -0300 Subject: [PATCH] sysvipc: Fix semtimedop for Linux < 5.1 Kernels older than 5.1 will fail with ENOSYS when calling semtimedop_time64 syscall in __semtimedop_time64. Just like for !__ASSUME_TIME64_SYSCALLS, we should fallback to using the old mechanism in such cases. --- sysdeps/unix/sysv/linux/semtimedop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/semtimedop.c b/sysdeps/unix/sysv/linux/semtimedop.c index a9ad922ee2..510fea1852 100644 --- a/sysdeps/unix/sysv/linux/semtimedop.c +++ b/sysdeps/unix/sysv/linux/semtimedop.c @@ -32,7 +32,7 @@ __semtimedop64 (int semid, struct sembuf *sops, size_t nsops, int r = INLINE_SYSCALL_CALL (semtimedop_time64, semid, sops, nsops, timeout); -#ifndef __ASSUME_TIME64_SYSCALLS +#if !(defined __ASSUME_TIME64_SYSCALLS) || __LINUX_KERNEL_VERSION < 0x050100 if (r == 0 || errno != ENOSYS) return r; -- 2.26.2