From: james Date: Wed, 25 Apr 2007 23:23:27 +0000 (+0000) Subject: Fixed 64-bit portability bug in time_string function (Thomas Habets). X-Git-Tag: v2.1_rc4~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e726b9062d507e9fecfb5f6bbb43dd9c1148175c;p=thirdparty%2Fopenvpn.git Fixed 64-bit portability bug in time_string function (Thomas Habets). git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1880 e7ae566f-a301-0410-adde-c780ea21d3b5 --- diff --git a/otime.c b/otime.c index 690fe2786..d21b08be2 100644 --- a/otime.c +++ b/otime.c @@ -130,7 +130,8 @@ time_string (time_t t, int usec, bool show_usec, struct gc_arena *gc) } mutex_lock_static (L_CTIME); - buf_printf (&out, "%s", ctime ((const time_t *)&tv.tv_sec)); + t = tv.tv_sec; + buf_printf (&out, "%s", ctime(&t)); mutex_unlock_static (L_CTIME); buf_rmtail (&out, '\n');