From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22322 invoked from network); 27 Dec 2020 21:54:36 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 27 Dec 2020 21:54:36 -0000 Received: (qmail 28657 invoked by uid 550); 27 Dec 2020 21:54:34 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 28639 invoked from network); 27 Dec 2020 21:54:34 -0000 Date: Sun, 27 Dec 2020 16:54:21 -0500 From: Rich Felker To: Alexander Lobakin Cc: musl@lists.openwall.com Message-ID: <20201227215421.GB22981@brightrain.aerifal.cx> References: <20201227183842.22030-1-alobakin@pm.me> <20201227184032.22413-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201227184032.22413-1-alobakin@pm.me> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [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 > --- > 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