From 9a7306a64767cd0befddae602ff1e1b99c4d0273 Mon Sep 17 00:00:00 2001 From: Seth Morabito Date: Thu, 30 Nov 2017 00:14:24 +0000 Subject: [PATCH] 3b2: Use localtime instead of localtime_r --- 3B2/3b2_sysdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3B2/3b2_sysdev.c b/3B2/3b2_sysdev.c index 902ea9e8..7646b9e6 100644 --- a/3B2/3b2_sysdev.c +++ b/3B2/3b2_sysdev.c @@ -750,7 +750,7 @@ void tod_resync() sec = now.tv_sec - td->delta; /* Populate the tm struct based on current sim_time */ - localtime_r(&sec, &tm); + tm = *localtime(&sec); td->tsec = 0; td->unit_sec = tm.tm_sec % 10; @@ -797,7 +797,7 @@ void tod_update_delta() } tm.tm_isdst = 0; ssec = mktime(&tm); - td->delta = now.tv_sec - ssec; + td->delta = (int32)(now.tv_sec - ssec); } uint32 tod_read(uint32 pa, size_t size)