diff dbutil.c @ 930:8f04e36622c0

Fix monotonic_now() on OS X
author Matt Johnston <matt@ucc.asn.au>
date Fri, 21 Mar 2014 22:16:42 +0800
parents 7cd89d4e0335
children d93a6bcf616f
line wrap: on
line diff
--- a/dbutil.c	Sat Mar 15 11:37:02 2014 +0800
+++ b/dbutil.c	Fri Mar 21 22:16:42 2014 +0800
@@ -962,7 +962,7 @@
 	return ts.tv_sec;
 #elif defined(HAVE_MACH_ABSOLUTE_TIME)
 	/* OS X, see https://developer.apple.com/library/mac/qa/qa1398/_index.html */
-	mach_timebase_info_data_t timebase_info;
+	static mach_timebase_info_data_t timebase_info;
 	if (timebase_info.denom == 0) {
 		mach_timebase_info(&timebase_info);
 	}