From fb30e73b7cf6b9ad0ad75aadf73679796789f51c Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Thu, 9 Jun 2011 10:54:12 +1000 Subject: Revert to using localtime() and rand() Some platforms don't have localtime_r() and rand_r() --- jim-clock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'jim-clock.c') diff --git a/jim-clock.c b/jim-clock.c index f771f71..51ffb51 100644 --- a/jim-clock.c +++ b/jim-clock.c @@ -26,7 +26,6 @@ static int clock_cmd_format(Jim_Interp *interp, int argc, Jim_Obj *const *argv) char buf[100]; time_t t; long seconds; - struct tm tm; const char *format = "%a %b %d %H:%M:%S %Z %Y"; @@ -43,7 +42,7 @@ static int clock_cmd_format(Jim_Interp *interp, int argc, Jim_Obj *const *argv) } t = seconds; - strftime(buf, sizeof(buf), format, localtime_r(&t, &tm)); + strftime(buf, sizeof(buf), format, localtime(&t)); Jim_SetResultString(interp, buf, -1); -- cgit v1.1