X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=configure;h=e91ec2582406895772a19e80b20e36bedc32b372;hb=b765bec0be97ef05e5af6cfbf4e0a2c8b7596a03;hp=e8e695313e24c11d1f6d92db4a60681a0854a9f3;hpb=9ada751de9177687b19e3398d43fdb706ea14a09;p=fio.git diff --git a/configure b/configure index e8e69531..e91ec258 100755 --- a/configure +++ b/configure @@ -1621,6 +1621,11 @@ echo "getmntent $getmntent" ########################################## # Check whether we have getmntinfo +# These are originally added for BSDs, but may also work +# on other operating systems with getmntinfo(3). + +# getmntinfo(3) for FreeBSD/DragonFlyBSD/OpenBSD. +# Note that NetBSD needs -Werror to catch warning as error. getmntinfo="no" cat > $TMPC << EOF #include @@ -1632,11 +1637,28 @@ int main(int argc, char **argv) return getmntinfo(&st, MNT_NOWAIT); } EOF -if compile_prog "" "" "getmntinfo"; then +if compile_prog "-Werror" "" "getmntinfo"; then getmntinfo="yes" fi echo "getmntinfo $getmntinfo" +# getmntinfo(3) for NetBSD. +getmntinfo_statvfs="no" +cat > $TMPC << EOF +#include +#include +int main(int argc, char **argv) +{ + struct statvfs *st; + return getmntinfo(&st, MNT_NOWAIT); +} +EOF +# Skip the test if the one with statfs arg is detected. +if test "$getmntinfo" != "yes" && compile_prog "-Werror" "" "getmntinfo_statvfs"; then + getmntinfo_statvfs="yes" + echo "getmntinfo_statvfs $getmntinfo_statvfs" +fi + ########################################## # Check whether we have _Static_assert static_assert="no" @@ -1883,6 +1905,9 @@ fi if test "$getmntinfo" = "yes" ; then output_sym "CONFIG_GETMNTINFO" fi +if test "$getmntinfo_statvfs" = "yes" ; then + output_sym "CONFIG_GETMNTINFO_STATVFS" +fi if test "$static_assert" = "yes" ; then output_sym "CONFIG_STATIC_ASSERT" fi