|
Message-ID: <20201227215421.GB22981@brightrain.aerifal.cx> Date: Sun, 27 Dec 2020 16:54:21 -0500 From: Rich Felker <dalias@...ifal.cx> To: Alexander Lobakin <alobakin@...me> Cc: musl@...ts.openwall.com Subject: Re: [PATCH 01/18] clock_gettime: prefer time64 variant if available On Sun, Dec 27, 2020 at 06:40:45PM +0000, Alexander Lobakin wrote: > 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 This change is a functional nop, just removing code that's left from prior to the time64 switchover. It's probably not objectionable, but it's not described accurately. Rich
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.