Thread (7 messages) 7 messages, 4 authors, 2016-06-15

Re: [PATCH] 64-bit fix for date.c.

flat view

From: Jeff King <hidden>
Date: 2016-06-15 22:46:34

On Mon, Apr 06, 2009 at 07:26:37PM +0200, Bernd Ahlers wrote:
quoted hunk ↗ jump to hunk
@@ -871,13 +871,15 @@ unsigned long approxidate(const char *date)
 	struct timeval tv;
+	time_t time_sec;
[...]
 	gettimeofday(&tv, NULL);
-	localtime_r(&tv.tv_sec, &tm);
+	time_sec = tv.tv_sec;
+	localtime_r(&time_sec, &tm);
Hmph. According to POSIX, tv_sec _is_ a time_t. But I see on FreeBSD,
also, it is actually a "long". So I think this fix makes sense.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help