diff --git a/scp.c b/scp.c index c43f606b..1d419167 100644 --- a/scp.c +++ b/scp.c @@ -6910,7 +6910,8 @@ if (sim_deb_switches & (SWMASK ('T') | SWMASK ('R') | SWMASK ('A'))) { sim_timespec_diff (&time_now, &time_now, &sim_deb_basetime); } if (sim_deb_switches & SWMASK ('T')) { - struct tm *now = gmtime(&time_now.tv_sec); + time_t tnow = (time_t)time_now.tv_sec; + struct tm *now = gmtime(&tnow); sprintf(tim_t, "%02d:%02d:%02d.%03d ", now->tm_hour, now->tm_min, now->tm_sec, (int)(time_now.tv_nsec/1000000)); }