Message ID | 20210518205613.1487824-10-adhemerval.zanella@linaro.org |
---|---|
State | New |
Headers | show |
Series | Add 64 bit time support on legacy ABIs | expand |
On Tue, 18 May 2021 17:55:57 -0300 Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote: > The __USE_TIME_BITS64 is not defined internally yet. > --- > time/bits/types/struct_timeval.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/time/bits/types/struct_timeval.h > b/time/bits/types/struct_timeval.h index 70394ce886..3466137c35 100644 > --- a/time/bits/types/struct_timeval.h > +++ b/time/bits/types/struct_timeval.h > @@ -7,7 +7,12 @@ > microsecond but also has a range of years. */ > struct timeval > { > +#ifdef __USE_TIME_BITS64 > + __time64_t tv_sec; /* Seconds. */ > + __suseconds64_t tv_usec; /* Microseconds. */ > +#else > __time_t tv_sec; /* Seconds. */ > __suseconds_t tv_usec; /* Microseconds. */ > +#endif > }; > #endif Reviewed-by: Lukasz Majewski <lukma@denx.de> 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
On 5/18/21 4:55 PM, Adhemerval Zanella wrote: > The __USE_TIME_BITS64 is not defined internally yet. LGTM. No regressions on x86_64, i686, ppc64le, aarch64, s390x. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com> > --- > time/bits/types/struct_timeval.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/time/bits/types/struct_timeval.h b/time/bits/types/struct_timeval.h > index 70394ce886..3466137c35 100644 > --- a/time/bits/types/struct_timeval.h > +++ b/time/bits/types/struct_timeval.h > @@ -7,7 +7,12 @@ > microsecond but also has a range of years. */ > struct timeval > { > +#ifdef __USE_TIME_BITS64 > + __time64_t tv_sec; /* Seconds. */ > + __suseconds64_t tv_usec; /* Microseconds. */ OK. > +#else > __time_t tv_sec; /* Seconds. */ > __suseconds_t tv_usec; /* Microseconds. */ > +#endif > }; > #endif >
diff --git a/time/bits/types/struct_timeval.h b/time/bits/types/struct_timeval.h index 70394ce886..3466137c35 100644 --- a/time/bits/types/struct_timeval.h +++ b/time/bits/types/struct_timeval.h @@ -7,7 +7,12 @@ microsecond but also has a range of years. */ struct timeval { +#ifdef __USE_TIME_BITS64 + __time64_t tv_sec; /* Seconds. */ + __suseconds64_t tv_usec; /* Microseconds. */ +#else __time_t tv_sec; /* Seconds. */ __suseconds_t tv_usec; /* Microseconds. */ +#endif }; #endif