OSX: Fixup warnings and clock_gettime() bug
[fio.git] / os / os.h
diff --git a/os/os.h b/os/os.h
index 1d3a750ac526f7b016e1a166e6c6d13b4681266c..a14d7f0c0333152ed6663d895d787fb95d7e1f18 100644 (file)
--- a/os/os.h
+++ b/os/os.h
@@ -44,11 +44,7 @@ enum {
 #error "unsupported os"
 #endif
 
-#ifdef FIO_HAVE_LIBAIO
-#include <libaio.h>
-#endif
-
-#ifdef FIO_HAVE_POSIXAIO
+#ifdef CONFIG_POSIXAIO
 #include <aio.h>
 #ifndef FIO_OS_HAVE_AIOCB_TYPEDEF
 typedef struct aiocb os_aiocb_t;
@@ -60,7 +56,7 @@ typedef struct aiocb os_aiocb_t;
 #include <scsi/sg.h>
 #endif
 
-#ifndef FIO_HAVE_STRSEP
+#ifdef CONFIG_STRSEP
 #include "../lib/strsep.h"
 #endif
 
@@ -116,12 +112,6 @@ typedef unsigned long os_cpu_mask_t;
 #define OS_RAND_MAX                    RAND_MAX
 #endif
 
-#ifdef FIO_HAVE_CLOCK_MONOTONIC
-#define FIO_TIMER_CLOCK CLOCK_MONOTONIC
-#else
-#define FIO_TIMER_CLOCK CLOCK_REALTIME
-#endif
-
 #ifndef FIO_HAVE_RAWBIND
 #define fio_lookup_raw(dev, majdev, mindev)    1
 #endif
@@ -135,15 +125,15 @@ typedef unsigned long os_cpu_mask_t;
 #endif
 
 #ifndef FIO_PREFERRED_CLOCK_SOURCE
-#define FIO_PREFERRED_CLOCK_SOURCE     CS_GTOD
+#define FIO_PREFERRED_CLOCK_SOURCE     CS_CGETTIME
 #endif
 
 #ifndef FIO_MAX_JOBS
 #define FIO_MAX_JOBS           2048
 #endif
 
-#ifndef FIO_OS_HAVE_SOCKLEN_T
-typedef socklen_t fio_socklen_t;
+#ifndef CONFIG_SOCKLEN_T
+typedef unsigned int socklen_t;
 #endif
 
 #ifndef FIO_OS_HAS_CTIME_R