--- libeio/libeio.m4 2011/07/07 22:37:11 1.15 +++ libeio/libeio.m4 2011/07/24 03:32:54 1.16 @@ -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 @@ ],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 +#include +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