diff options
author | root <root> | 2011-07-07 22:36:18 +0000 |
---|---|---|
committer | root <root> | 2011-07-07 22:36:18 +0000 |
commit | d94cbd62828958bc2eff4815b2dcf0d4a52e19b4 (patch) | |
tree | c389a6950c3c41123e7b6e4265a5ee80c322d999 /libeio.m4 | |
parent | fdbeee91855102a6de640976ccd55198f2fd5a89 (diff) |
fallocate
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 |