diff options
Diffstat (limited to 'libeio.m4')
-rw-r--r-- | libeio.m4 | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -123,6 +123,21 @@ int main (void) ],ac_cv_sync_file_range=yes,ac_cv_sync_file_range=no)]) test $ac_cv_sync_file_range = yes && AC_DEFINE(HAVE_SYNC_FILE_RANGE, 1, sync_file_range(2) is available) +AC_CACHE_CHECK(for fallocate, ac_cv_fallocate, [AC_LINK_IFELSE([ +#include <fcntl.h> +int main (void) +{ + int fd = 0; + int mode = FALLOC_FL_KEEP_SIZE; + off_t offset = 1; + off_t len = 1; + int res; + res = fallocate (fd, mode, offset, len); + return 0; +} +],ac_cv_fallocate=yes,ac_cv_fallocate=no)]) +test $ac_cv_fallocate = yes && AC_DEFINE(HAVE_FALLOCATE, 1, fallocate(2) is available) + dnl ############################################################################# dnl # these checks exist for the benefit of IO::AIO |