#include <unistd.h>
#include <stdlib.h>
+#include "../arch/arch.h"
+
enum {
os_linux = 1,
os_aix,
#include <scsi/sg.h>
#endif
-#ifdef CONFIG_STRSEP
+#ifndef CONFIG_STRSEP
#include "../lib/strsep.h"
#endif
#endif
#ifndef FIO_HAVE_IOPRIO
-#define ioprio_set(which, who, prio) (0)
+#define ioprio_set(which, who, prioclass, prio) (0)
#endif
#ifndef FIO_HAVE_ODIRECT
#define OS_O_DIRECT O_DIRECT
#endif
+#ifdef OS_O_ATOMIC
+#define FIO_O_ATOMIC OS_O_ATOMIC
+#else
+#define FIO_O_ATOMIC 0
+#endif
+
#ifndef FIO_HAVE_HUGETLB
#define SHM_HUGETLB 0
#define MAP_HUGETLB 0
#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
#endif
#ifndef FIO_OS_HAS_CTIME_R
-#define os_ctime_r(x, y, z) ctime_r((x), (y))
+#define os_ctime_r(x, y, z) (void) ctime_r((x), (y))
#endif
#ifdef FIO_USE_GENERIC_SWAP