|
Message-ID: <20201227184032.22413-8-alobakin@pm.me> Date: Sun, 27 Dec 2020 18:41:39 +0000 From: Alexander Lobakin <alobakin@...me> To: Rich Felker <dalias@...ifal.cx>, musl@...ts.openwall.com Cc: Alexander Lobakin <alobakin@...me> Subject: [PATCH 08/18] timerfd_gettime: prefer time64 variant if available Instead of using time64 variant "only when needed", use it as a default and fallback to time32 only on -ENOSYS. Signed-off-by: Alexander Lobakin <alobakin@...me> --- src/linux/timerfd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/linux/timerfd.c b/src/linux/timerfd.c index 5bdfaf165691..d26371cc1182 100644 --- a/src/linux/timerfd.c +++ b/src/linux/timerfd.c @@ -40,9 +40,7 @@ int timerfd_settime(int fd, int flags, const struct itimerspec *new, struct itim int timerfd_gettime(int fd, struct itimerspec *cur) { #ifdef SYS_timerfd_gettime64 - int r = -ENOSYS; - if (sizeof(time_t) > 4) - r = __syscall(SYS_timerfd_gettime64, fd, cur); + int r = __syscall(SYS_timerfd_gettime64, fd, cur); if (SYS_timerfd_gettime == SYS_timerfd_gettime64 || r!=-ENOSYS) return __syscall_ret(r); long cur32[4]; -- 2.29.2
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.