summaryrefslogtreecommitdiff
path: root/libeio.m4
diff options
context:
space:
mode:
Diffstat (limited to 'libeio.m4')
-rw-r--r--libeio.m412
1 files changed, 11 insertions, 1 deletions
diff --git a/libeio.m4 b/libeio.m4
index f6c7078..fb6591b 100644
--- a/libeio.m4
+++ b/libeio.m4
@@ -1,6 +1,6 @@
dnl openbsd in it's neverending brokenness requires stdint.h for intptr_t,
dnl but that header isn't very portable...
-AC_CHECK_HEADERS([stdint.h])
+AC_CHECK_HEADERS([stdint.h sys/syscall.h])
AC_SEARCH_LIBS(
pthread_create,
@@ -138,6 +138,16 @@ int main (void)
],ac_cv_fallocate=yes,ac_cv_fallocate=no)])
test $ac_cv_fallocate = yes && AC_DEFINE(HAVE_FALLOCATE, 1, fallocate(2) is available)
+AC_CACHE_CHECK(for sys_syncfs, ac_cv_sys_syncfs, [AC_LINK_IFELSE([
+#include <unistd.h>
+#include <sys/syscall.h>
+int main (void)
+{
+ int res = syscall (__NR_syncfs, (int)0);
+}
+],ac_cv_sys_syncfs=yes,ac_cv_sys_syncfs=no)])
+test $ac_cv_sys_syncfs = yes && AC_DEFINE(HAVE_SYS_SYNCFS, 1, syscall(__NR_syncfs) is available)
+
dnl #############################################################################
dnl # these checks exist for the benefit of IO::AIO