Fix mac build.

Change-Id: Ife4477e562d7c655f64186ed1f05df3eb1fed074
diff --git a/src/mutex.cc b/src/mutex.cc
index 18dc863..cbf115e 100644
--- a/src/mutex.cc
+++ b/src/mutex.cc
@@ -104,7 +104,15 @@
   int64_t endSec;
 
   if (absolute) {
+#if !defined(__APPLE__)
     clock_gettime(clock, ts);
+#else
+    UNUSED(clock);
+    timeval tv;
+    gettimeofday(&tv, NULL);
+    ts->tv_sec = tv.tv_sec;
+    ts->tv_nsec = tv.tv_usec * 1000;
+#endif
   } else {
     ts->tv_sec = 0;
     ts->tv_nsec = 0;