From 28b53508aa4cd06933fa1bcbbaa791ad12ecbf51 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 28 Jan 2020 00:48:58 +0100 Subject: 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. --- Makefile.am | 2 +- include/sys/types.h | 2 +- 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 -- cgit v1.2.3