summaryrefslogtreecommitdiff
path: root/libeio.m4
diff options
context:
space:
mode:
authorroot <root>2011-07-24 03:32:54 +0000
committerroot <root>2011-07-24 03:32:54 +0000
commit95c2bf9fb4cfcbceebac121d5a5a0d702af25cef (patch)
tree9b1f131a618da0a372e46b8a83b3d9b712e2414d /libeio.m4
parentb6919596507d363d8777bb551ab5ca8b1bbbc28b (diff)
*** empty log message ***
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