Use ENOTSUP if OS doesn't support blkdev page cache invalidation
[fio.git] / os / os-mac.h
index 76d388e9201f357b8c6867ca9f8e0e5c799e1602..7de36ea79aa7b43a7f962796526cf000a2458527 100644 (file)
@@ -35,7 +35,9 @@
 
 typedef off_t off64_t;
 
+#ifndef CONFIG_CLOCKID_T
 typedef unsigned int clockid_t;
+#endif
 
 #define FIO_OS_DIRECTIO
 static inline int fio_set_odirect(int fd)
@@ -75,7 +77,7 @@ static inline int chardev_size(struct fio_file *f, unsigned long long *bytes)
 
 static inline int blockdev_invalidate_cache(struct fio_file *f)
 {
-       return EINVAL;
+       return ENOTSUP;
 }
 
 static inline unsigned long long os_phys_mem(void)