summaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-02-17 16:19:23 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-15 10:42:11 -0300
commitbdc4782744df73a8c0559985c54b5b6b9c7a4a74 (patch)
tree01c321ba12bc32fe882ad3ebc3b77ef42d4758ab /time
parentfad1df51cc268da240a87986777834e43d419f94 (diff)
downloadglibc-bdc4782744df73a8c0559985c54b5b6b9c7a4a74.tar.gz
y2038: Add __USE_TIME_BITS64 support for struct timeval
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>
Diffstat (limited to 'time')
-rw-r--r--time/bits/types/struct_timeval.h5
1 files changed, 5 insertions, 0 deletions
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