From: Adhemerval Zanella Date: Wed, 17 Feb 2021 19:19:23 +0000 (-0300) Subject: y2038: Add __USE_TIME_BITS64 support for struct timeval X-Git-Tag: glibc-2.34~291 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bdc4782744df73a8c0559985c54b5b6b9c7a4a74;p=thirdparty%2Fglibc.git y2038: Add __USE_TIME_BITS64 support for struct timeval The __USE_TIME_BITS64 is not defined internally yet. Reviewed-by: Lukasz Majewski Reviewed-by: Carlos O'Donell Tested-by: Carlos O'Donell --- diff --git a/time/bits/types/struct_timeval.h b/time/bits/types/struct_timeval.h index 70394ce886d..3466137c35f 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