linux: fallocate() fixes
authorJens Axboe <axboe@kernel.dk>
Thu, 1 Mar 2012 15:07:46 +0000 (16:07 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Mar 2012 15:07:46 +0000 (16:07 +0100)
Enable posix_fallocate() for glibc >= 2.6 as before, but
only enable fallocate() from 2.8 and up.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
os/os-linux.h

index 3bf6bd97fbd69a806f3c5948652669e78dc804ba..d5c3f76e03fb40afe8c3807f0ded8620f50b1d1e 100644 (file)
@@ -50,6 +50,9 @@
  * Can only enable this for newer glibcs, or the header and defines are
  * missing
  */
+#if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 6
+#define FIO_HAVE_FALLOCATE
+#endif
 #if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 8
 #define FIO_HAVE_LINUX_FALLOCATE
 #endif