|
Message-ID: <20201227184032.22413-6-alobakin@pm.me> Date: Sun, 27 Dec 2020 18:41:26 +0000 From: Alexander Lobakin <alobakin@...me> To: Rich Felker <dalias@...ifal.cx>, musl@...ts.openwall.com Cc: Alexander Lobakin <alobakin@...me> Subject: [PATCH 06/18] timer_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/time/timer_gettime.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/time/timer_gettime.c b/src/time/timer_gettime.c index 21c9d32c3fe5..4f197f9a973c 100644 --- a/src/time/timer_gettime.c +++ b/src/time/timer_gettime.c @@ -9,9 +9,7 @@ int timer_gettime(timer_t t, struct itimerspec *val) t = (void *)(uintptr_t)(td->timer_id & INT_MAX); } #ifdef SYS_timer_gettime64 - int r = -ENOSYS; - if (sizeof(time_t) > 4) - r = __syscall(SYS_timer_gettime64, t, val); + int r = __syscall(SYS_timer_gettime64, t, val); if (SYS_timer_gettime == SYS_timer_gettime64 || r!=-ENOSYS) return __syscall_ret(r); long val32[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.