From 86e53416e5758d56e950af6cfbe407065ef36879 Mon Sep 17 00:00:00 2001 From: Bruce Cran Date: Sat, 2 Feb 2013 20:54:36 +0000 Subject: [PATCH] Default to CS_GTOD if CONFIG_CLOCK_GETTIME isn't defined. Defaulting the clock source to CS_CGETTIME broke on OS X because it doesn't have clock_gettime. Use CS_GTOD if CONFIG_CLOCK_GETTIME isn't defined. Signed-off-by: Jens Axboe --- os/os.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/os/os.h b/os/os.h index ef9f91f5..ce331601 100644 --- a/os/os.h +++ b/os/os.h @@ -125,7 +125,11 @@ typedef unsigned long os_cpu_mask_t; #endif #ifndef FIO_PREFERRED_CLOCK_SOURCE +#ifdef CONFIG_CLOCK_GETTIME #define FIO_PREFERRED_CLOCK_SOURCE CS_CGETTIME +#else +#define FIO_PREFERRED_CLOCK_SOURCE CS_GTOD +#endif #endif #ifndef FIO_MAX_JOBS -- 2.25.1