From: Bruce Cran Date: Sat, 2 Feb 2013 20:54:36 +0000 (+0000) Subject: Default to CS_GTOD if CONFIG_CLOCK_GETTIME isn't defined. X-Git-Tag: fio-2.0.14~43 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=86e53416e5758d56e950af6cfbe407065ef36879 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 --- 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