[PATCH 10/18] linux: timerfd_gettime minor cleanup
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Jun 17 11:50:56 GMT 2021
The __NR_timerfd_gettime64 is always defined.
---
sysdeps/unix/sysv/linux/timerfd_gettime.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/timerfd_gettime.c b/sysdeps/unix/sysv/linux/timerfd_gettime.c
index 89f8066b91..5f668257c4 100644
--- a/sysdeps/unix/sysv/linux/timerfd_gettime.c
+++ b/sysdeps/unix/sysv/linux/timerfd_gettime.c
@@ -25,17 +25,17 @@
int
__timerfd_gettime64 (int fd, struct __itimerspec64 *value)
{
+#ifndef __NR_timerfd_gettime64
+# define __NR_timerfd_gettime64 __NR_timerfd_gettime
+#endif
+
#ifdef __ASSUME_TIME64_SYSCALLS
-# ifndef __NR_timerfd_gettime64
-# define __NR_timerfd_gettime64 __NR_timerfd_gettime
-# endif
return INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value);
#else
-# ifdef __NR_timerfd_gettime64
int ret = INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value);
if (ret == 0 || errno != ENOSYS)
return ret;
-# endif
+
struct itimerspec its32;
int retval = INLINE_SYSCALL_CALL (timerfd_gettime, fd, &its32);
if (retval == 0)
--
2.30.2
More information about the Libc-alpha
mailing list