Fix compile for older Linux without mmap MAP_HUGETLB
[fio.git] / os / os-solaris.h
index 5bf868ac8f527c3ed56c130ee633d12b5ab3b693..e7a544e1a0bc37c4766a2dc303da9701a1421efa 100644 (file)
@@ -22,6 +22,7 @@
 #define FIO_HAVE_FDATASYNC
 #define FIO_HAVE_CHARDEV_SIZE
 #define FIO_USE_GENERIC_BDEV_SIZE
+#define FIO_USE_GENERIC_INIT_RANDOM_STATE
 #define FIO_HAVE_GETTID
 
 #define OS_MAP_ANON            MAP_ANON
@@ -48,6 +49,9 @@ struct solaris_rand_seed {
 #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;
 
@@ -111,24 +115,16 @@ static inline int fio_set_odirect(int fd)
 
 static inline int fio_cpuset_init(os_cpu_mask_t *mask)
 {
-       int ret;
-
-       if (pset_create(mask) < 0) {
-               ret = errno;
+       if (pset_create(mask) < 0)
                return -1;
-       }
 
        return 0;
 }
 
 static inline int fio_cpuset_exit(os_cpu_mask_t *mask)
 {
-       int ret;
-
-       if (pset_destroy(*mask) < 0) {
-               ret = errno;
+       if (pset_destroy(*mask) < 0)
                return -1;
-       }
 
        return 0;
 }