[PATCH 5/5] y2038: Replace __clock_gettime with __clock_gettime64
Lukasz Majewski
lukma@denx.de
Tue Mar 24 14:35:04 GMT 2020
Hi Andreas,
> On Mär 24 2020, Lukasz Majewski wrote:
>
> > diff --git a/login/logout.c b/login/logout.c
> > index 7653fe8886..a421d07301 100644
> > --- a/login/logout.c
> > +++ b/login/logout.c
> > @@ -47,9 +47,13 @@ logout (const char *line)
> > memset (ut->ut_name, '\0', sizeof ut->ut_name);
> > memset (ut->ut_host, '\0', sizeof ut->ut_host);
> >
> > - struct timespec ts;
> > - __clock_gettime (CLOCK_REALTIME, &ts);
> > + struct __timespec64 ts;
> > + __clock_gettime64 (CLOCK_REALTIME, &ts);
> > +#if __WORDSIZE_TIME64_COMPAT32 || defined __s390x__ || defined
> > __s390__ TIMESPEC_TO_TIMEVAL (&ut->ut_tv, &ts);
> > +#else
> > + ut->ut_tv = valid_timespec64_to_timeval (ts);
> > +#endif
>
> Doesn't TIMESPEC_TO_TIMEVAL work generically?
Good point. In this case there shouldn't be any need to add static
inlined (with type checking) conversion functions.
>
> Andreas.
>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20200324/bb870096/attachment.sig>
More information about the Libc-alpha
mailing list