+#define fio_swap16(x) BSWAP_16(x)
+#define fio_swap32(x) BSWAP_32(x)
+#define fio_swap64(x) BSWAP_64(x)
+
+struct solaris_rand_seed {
+ unsigned short r[3];
+};
+
+#ifndef POSIX_MADV_SEQUENTIAL
+#define posix_madvise madvise
+#define POSIX_MADV_SEQUENTIAL MADV_SEQUENTIAL
+#define POSIX_MADV_DONTNEED MADV_DONTNEED
+#define POSIX_MADV_RANDOM MADV_RANDOM
+#endif
+
+#define os_ctime_r(x, y, z) ctime_r((x), (y), (z))
+#define FIO_OS_HAS_CTIME_R
+
+typedef psetid_t os_cpu_mask_t;
+typedef struct solaris_rand_seed os_random_state_t;
+
+static inline int chardev_size(struct fio_file *f, unsigned long long *bytes)