1
0
mirror of https://github.com/open-simh/simh.git synced 2026-01-13 23:37:13 +00:00

SCP: Fix MinGW build warnings due to sizeof time_t

This commit is contained in:
Mark Pizzolato 2018-04-15 12:51:36 -07:00
parent afffe300ee
commit fdd9d87f80

View File

@ -2240,11 +2240,13 @@ if (r != SCPE_OK)
sim_deb_switches = sim_switches; /* save debug switches */
if (sim_deb_switches & SWMASK ('R')) {
struct tm loc_tm, gmt_tm;
time_t time_t_now;
clock_gettime(CLOCK_REALTIME, &sim_deb_basetime);
time_t_now = (time_t)sim_deb_basetime.tv_sec;
/* Adjust the relative timebase to reflect the localtime GMT offset */
loc_tm = *localtime (&sim_deb_basetime.tv_sec);
gmt_tm = *gmtime (&sim_deb_basetime.tv_sec);
loc_tm = *localtime (&time_t_now);
gmt_tm = *gmtime (&time_t_now);
sim_deb_basetime.tv_sec -= mktime (&gmt_tm) - mktime (&loc_tm);
if (!(sim_deb_switches & (SWMASK ('A') | SWMASK ('T'))))
sim_deb_switches |= SWMASK ('T');