From 52ad4b94056b594b0fa1012467f944804a8241db Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 1 Mar 2012 16:07:46 +0100 Subject: [PATCH] linux: fallocate() fixes Enable posix_fallocate() for glibc >= 2.6 as before, but only enable fallocate() from 2.8 and up. Signed-off-by: Jens Axboe --- os/os-linux.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/os/os-linux.h b/os/os-linux.h index 3bf6bd97..d5c3f76e 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -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 -- 2.25.1