|
Message-ID: <20201227184032.22413-1-alobakin@pm.me> Date: Sun, 27 Dec 2020 18:40:45 +0000 From: Alexander Lobakin <alobakin@...me> To: Rich Felker <dalias@...ifal.cx>, musl@...ts.openwall.com Cc: Alexander Lobakin <alobakin@...me> Subject: [PATCH 01/18] clock_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/clock_gettime.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/time/clock_gettime.c b/src/time/clock_gettime.c index 3e1d0975b122..ec8d08c010cf 100644 --- a/src/time/clock_gettime.c +++ b/src/time/clock_gettime.c @@ -73,9 +73,7 @@ int __clock_gettime(clockid_t clk, struct timespec *ts) #endif #ifdef SYS_clock_gettime64 - r = -ENOSYS; - if (sizeof(time_t) > 4) - r = __syscall(SYS_clock_gettime64, clk, ts); + r = __syscall(SYS_clock_gettime64, clk, ts); if (SYS_clock_gettime == SYS_clock_gettime64 || r!=-ENOSYS) return __syscall_ret(r); long ts32[2]; -- 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.