summaryrefslogtreecommitdiff
path: root/libeio.m4
diff options
context:
space:
mode:
authorroot <root>2011-07-07 22:36:18 +0000
committerroot <root>2011-07-07 22:36:18 +0000
commitd94cbd62828958bc2eff4815b2dcf0d4a52e19b4 (patch)
treec389a6950c3c41123e7b6e4265a5ee80c322d999 /libeio.m4
parentfdbeee91855102a6de640976ccd55198f2fd5a89 (diff)
fallocate
Diffstat (limited to 'libeio.m4')
-rw-r--r--libeio.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/libeio.m4 b/libeio.m4
index 32b81c2..08a0422 100644
--- a/libeio.m4
+++ b/libeio.m4
@@ -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