Add directio support to Solaris

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/os/os-solaris.h b/os/os-solaris.h
index ac22bff..866e0c0 100644
--- a/os/os-solaris.h
+++ b/os/os-solaris.h
@@ -1,6 +1,9 @@
 #ifndef FIO_OS_SOLARIS_H
 #define FIO_OS_SOLARIS_H
 
+#include <sys/types.h>
+#include <sys/fcntl.h>
+
 #define FIO_HAVE_POSIXAIO
 #define FIO_HAVE_SOLARISAIO
 #define FIO_HAVE_FALLOCATE
@@ -51,4 +54,14 @@
 	return val;
 }
 
+#define FIO_OS_DIRECTIO
+extern int directio(int, int);
+static inline int fio_set_odirect(int fd)
+{
+	if (directio(fd, DIRECTIO_ON) < 0)
+		return errno;
+
+	return 0;
+}
+
 #endif