]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
y2038: Add __USE_TIME_BITS64 support for struct timeval
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 17 Feb 2021 19:19:23 +0000 (16:19 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Tue, 15 Jun 2021 13:42:11 +0000 (10:42 -0300)
The __USE_TIME_BITS64 is not defined internally yet.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
time/bits/types/struct_timeval.h

index 70394ce886de14d1cf62dd2ed7dce87930f60f50..3466137c35fb5d0e44dad8cc1ef7041832e27d97 100644 (file)
@@ -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