Fix build on XCode 8 w/OSX 10.12 SDK
CLOCK_REALTIME (along with clock_gettime and friends) are now defined,
so the build fails with a redefinition error.
Test: m checkbuild (w/XCode 8 on 10.11 with 10.12 SDK)
Change-Id: Ic8a5cc872ded1766597fda5f098d0e044cd063ee
diff --git a/runtime/base/time_utils.h b/runtime/base/time_utils.h
index 55d2764..383b52f 100644
--- a/runtime/base/time_utils.h
+++ b/runtime/base/time_utils.h
@@ -73,9 +73,11 @@
}
#if defined(__APPLE__)
-// No clocks to specify on OS/X, fake value to pass to routines that require a clock.
+#ifndef CLOCK_REALTIME
+// No clocks to specify on OS/X < 10.12, fake value to pass to routines that require a clock.
#define CLOCK_REALTIME 0xebadf00d
#endif
+#endif
// Sleep for the given number of nanoseconds, a bad way to handle contention.
void NanoSleep(uint64_t ns);