[master] f0746df OS/X does not have CLOCK_MONOTONIC, use CLOCK_REALTIME and hope nobody steps the clock...

Poul-Henning Kamp phk at varnish-cache.org
Mon Sep 19 12:04:36 CEST 2011


commit f0746df953ca90e11a48e10d9b6383feb63ac1f6
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 19 10:04:00 2011 +0000

    OS/X does not have CLOCK_MONOTONIC, use CLOCK_REALTIME and hope nobody
    steps the clock...
    
    Fixes	#1022

diff --git a/bin/varnishd/cache_pool.c b/bin/varnishd/cache_pool.c
index 2d64299..675fea6 100644
--- a/bin/varnishd/cache_pool.c
+++ b/bin/varnishd/cache_pool.c
@@ -58,6 +58,10 @@
 #include "stevedore.h"
 #include "hash_slinger.h"
 
+#ifndef CLOCK_MONOTONIC
+#define CLOCK_MONOTONIC CLOCK_REALTIME		/* OS/X is silly */
+#endif
+
 static void *waiter_priv;
 
 VTAILQ_HEAD(workerhead, worker);



More information about the varnish-commit mailing list