utils: fix build on Mac OS X 10.12
[project/libubox.git] / utils.c
diff --git a/utils.c b/utils.c
index e59002e..5d9d5aa 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -56,7 +56,7 @@ void *__calloc_a(size_t len, ...)
        return ret;
 }
 
        return ret;
 }
 
-#ifdef __APPLE__
+#ifdef LIBUBOX_COMPAT_CLOCK_GETTIME
 #include <mach/mach_host.h>            /* host_get_clock_service() */
 #include <mach/mach_port.h>            /* mach_port_deallocate() */
 #include <mach/mach_init.h>            /* mach_host_self(), mach_task_self() */
 #include <mach/mach_host.h>            /* host_get_clock_service() */
 #include <mach/mach_port.h>            /* mach_port_deallocate() */
 #include <mach/mach_init.h>            /* mach_host_self(), mach_task_self() */