X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=blobdiff_plain;f=m4%2Fpackage_libcdev.m4;h=14e67e18e7723da8820bb6a8463a0fe3773d01eb;hp=d612da2721ba83a2731df455301a36d6c6324754;hb=6497ede7ad4e9fc8e5a5a121bd600df896b7d9c6;hpb=d0b5d2750bf8e710fff541aa06602e2ebd4e8e07 diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4 index d612da27..14e67e18 100644 --- a/m4/package_libcdev.m4 +++ b/m4/package_libcdev.m4 @@ -8,7 +8,7 @@ AC_DEFUN([AC_HAVE_FADVISE], #define _FILE_OFFSET_BITS 64 #include ], [ - posix_fadvise(0, 1, 0, 0); + posix_fadvise(0, 1, 0, POSIX_FADV_NORMAL); ], have_fadvise=yes AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) @@ -65,3 +65,55 @@ AC_DEFUN([AC_HAVE_SENDFILE], AC_MSG_RESULT(no)) AC_SUBST(have_sendfile) ]) + +# +# Check if we have a getmntent libc call (Linux) +# +AC_DEFUN([AC_HAVE_GETMNTENT], + [ AC_MSG_CHECKING([for getmntent ]) + AC_TRY_COMPILE([ +#include +#include + ], [ + getmntent(0); + ], have_getmntent=yes + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) + AC_SUBST(have_getmntent) + ]) + +# +# Check if we have a getmntinfo libc call (FreeBSD, Mac OS X) +# +AC_DEFUN([AC_HAVE_GETMNTINFO], + [ AC_MSG_CHECKING([for getmntinfo ]) + AC_TRY_COMPILE([ +#include +#include +#include + ], [ + getmntinfo(0, 0); + ], have_getmntinfo=yes + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) + AC_SUBST(have_getmntinfo) + ]) + +# +# +# Check if we have a copy_file_range system call (Linux) +# +AC_DEFUN([AC_HAVE_COPY_FILE_RANGE], + [ AC_MSG_CHECKING([for copy_file_range]) + AC_TRY_LINK([ +#define _GNU_SOURCE +#include +#include + ], [ + syscall(__NR_copy_file_range, 0, 0, 0, 0, 0, 0); + ], have_copy_file_range=yes + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) + AC_SUBST(have_copy_file_range) + ]) +