SCP: Fix MinGW build warnings due to sizeof time_t
This commit is contained in:
parent
afffe300ee
commit
fdd9d87f80
1 changed files with 4 additions and 2 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Reference in a new issue