[v3,07/24] y2038: Add __USE_TIME_BITS64 support for time_t

Message ID 20210607203613.282543-8-adhemerval.zanella@linaro.org
State New
Headers show
Series
  • Add 64 bit time support on legacy ABIs
Related show

Commit Message

Adhemerval Zanella via Libc-alpha June 7, 2021, 8:35 p.m.
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/time_t.h | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.30.2

Patch

diff --git a/time/bits/types/time_t.h b/time/bits/types/time_t.h
index ab8287c6fe..84d67f6ac3 100644
--- a/time/bits/types/time_t.h
+++ b/time/bits/types/time_t.h
@@ -4,6 +4,10 @@ 
 #include <bits/types.h>
 
 /* Returned by `time'.  */
+#ifdef __USE_TIME_BITS64
+typedef __time64_t time_t;
+#else
 typedef __time_t time_t;
+#endif
 
 #endif