summaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorThorsten Wißmann <edu@thorsten-wissmann.de>2012-08-30 23:10:46 +0200
committerThorsten Wißmann <edu@thorsten-wissmann.de>2012-08-30 23:10:46 +0200
commitbff1d6cb485d18cf05a62b9bd54944d743579ff5 (patch)
tree27749c800460ed0dabe4a48540ef815404a59b67 /src/utils.c
parent0f35286362faabae32e80d10d6c627ebce08a73d (diff)
parentefca1a5df09c5e30e77f655d6b340404287924bd (diff)
Merge branch 'stable'
Conflicts: - NEWS - www/index.txt
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils.c b/src/utils.c
index ade35f6a..5b289427 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -22,7 +22,7 @@
#include <time.h>
#include <sys/time.h>
-#ifdef __MACH__
+#if defined(__MACH__) && ! defined(CLOCK_REALTIME)
#include <mach/clock.h>
#include <mach/mach.h>
#endif
@@ -33,7 +33,7 @@ char* g_tree_style; /* the one from layout.c */
time_t get_monotonic_timestamp() {
struct timespec ts;
-#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
+#if defined(__MACH__) && ! defined(CLOCK_REALTIME) // OS X does not have clock_gettime, use clock_get_time
clock_serv_t cclock;
mach_timespec_t mts;
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);