Modified: trunk/configure.ac (46 => 47)
--- trunk/configure.ac 2009-09-26 19:29:18 UTC (rev 46)
+++ trunk/configure.ac 2009-10-03 13:14:28 UTC (rev 47)
@@ -172,6 +172,8 @@
#
# Find functions and declarations we care about.
#
+AC_CHECK_DECLS([CLOCK_UPTIME, CLOCK_MONOTONIC], [], [],
+ [[#include <sys/time.h>]])
AC_CHECK_DECLS([EVFILT_SESSION, NOTE_NONE, NOTE_REAP, NOTE_SIGNAL], [], [],
[[#include <sys/event.h>]])
AC_CHECK_DECLS([VQ_UPDATE, VQ_VERYLOWDISK], [], [], [[#include <sys/mount.h>]])
Modified: trunk/src/os_shims.h (46 => 47)
--- trunk/src/os_shims.h 2009-09-26 19:29:18 UTC (rev 46)
+++ trunk/src/os_shims.h 2009-10-03 13:14:28 UTC (rev 47)
@@ -200,7 +200,13 @@
struct timespec ts;
int ret;
+#if HAVE_DECL_CLOCK_UPTIME
ret = clock_gettime(CLOCK_UPTIME, &ts);
+#elif HAVE_DECL_CLOCK_MONOTONIC
+ ret = clock_gettime(CLOCK_MONOTONIC, &ts);
+#else
+#error "clock_gettime: no supported absolute time clock"
+#endif
dispatch_assume_zero(ret);
/* XXXRW: Some kind of overflow detection needed? */