From 60fbaab9cef0d778fcec5a62fbd7a71e6e1973f7 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Mon, 15 Jul 2013 05:08:44 -1000 Subject: [PATCH] Fix time_t complaint when struct timespec doesn't have a time_t seconds value --- scp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)); }