summaryrefslogtreecommitdiff
path: root/libeio.m4
diff options
context:
space:
mode:
authorroot <root>2008-10-22 18:15:36 +0000
committerroot <root>2008-10-22 18:15:36 +0000
commit76c7228dfabca043f8685b4c21185d6506107658 (patch)
tree66d6960d7d3e02c62035810b8724877780ac3a5c /libeio.m4
parente1114224e950a1549be615d893899b3cdb2a832e (diff)
*** empty log message ***
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 8a87b2d..c3efcd2 100644
--- a/libeio.m4
+++ b/libeio.m4
@@ -90,3 +90,18 @@ int main(void)
],ac_cv_sendfile=yes,ac_cv_sendfile=no)])
test $ac_cv_sendfile = yes && AC_DEFINE(HAVE_SENDFILE, 1, sendfile(2) is available and supported)
+AC_CACHE_CHECK(for sync_file_range, ac_cv_sync_file_range, [AC_LINK_IFELSE([
+#include <fcntl.h>
+int main(void)
+{
+ int fd = 0;
+ off64_t offset = 1;
+ off64_t nbytes = 1;
+ unsigned int flags = SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE|SYNC_FILE_RANGE_WAIT_AFTER;
+ ssize_t res;
+ res = sync_file_range (fd, offset, nbytes, flags);
+ return 0;
+}
+],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)
+