summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-01-28 00:48:58 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-01-28 00:50:25 +0100
commit28b53508aa4cd06933fa1bcbbaa791ad12ecbf51 (patch)
tree2d851b8805a08b2b44103f1c6c6a05ae002f99f4
parent4adf780d61796c45f58100ed15d9c9a0a3c562fc (diff)
Set time_t type to 64bit
In order to fix year 2038 limit in RTC driver * include/sys/types.h (time_t): Bump type to 64bit. * Makefile.am (clib_routines): Also allow __moddi3.
-rw-r--r--Makefile.am2
-rw-r--r--include/sys/types.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 11312a1e..d1968b85 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -170,7 +170,7 @@ noinst_PROGRAMS += \
# This is the list of routines we decide is OK to steal from the C library.
clib_routines := htonl htons ntohl ntohs \
udivdi3 __udivdi3 __udivmoddi4 __umoddi3 \
- __divdi3 \
+ __divdi3 __moddi3 \
__rel_iplt_start __rel_iplt_end \
__ffsdi2 ffs \
_START _start etext _edata end _end # actually ld magic, not libc.
diff --git a/include/sys/types.h b/include/sys/types.h
index d576cc2a..8d5af37a 100644
--- a/include/sys/types.h
+++ b/include/sys/types.h
@@ -54,7 +54,7 @@ typedef char * caddr_t; /* address of a (signed) char */
#ifndef _TIME_T
#define _TIME_T
-typedef unsigned int time_t;
+typedef unsigned long long time_t;
#endif
#define RAND_MAX 0x7fffffff