diff options
author | Volker Lendecke <vl@samba.org> | 2012-03-02 02:10:52 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-03-02 12:04:34 +0100 |
commit | 6c1c092f079492d359437c76eb5319a0bf20f013 (patch) | |
tree | 988151b4ca8091ae6f7732a1977f647aa17b4178 /source3 | |
parent | 8bdc2890999c850519913be0e829e9ced979ac2f (diff) | |
download | samba-6c1c092f079492d359437c76eb5319a0bf20f013.tar.gz samba-6c1c092f079492d359437c76eb5319a0bf20f013.tar.bz2 samba-6c1c092f079492d359437c76eb5319a0bf20f013.zip |
s3: Test for statfs before statfs64
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Mar 2 12:04:35 CET 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/configure.in | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/source3/configure.in b/source3/configure.in index 6269b4c6d9..937867dc9a 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -5240,6 +5240,26 @@ fi AC_CHECKING(how to get filesystem space usage) space=no +# Perform only the link test since it seems there are no variants of the +# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) +# because that got a false positive on SCO OSR5. Adding the declaration +# of a `struct statvfs' causes this test to fail (as it should) on such +# systems. That system is reported to work fine with STAT_STATFS4 which +# is what it gets when this test fails. +if test $space = no; then + # SVR4 + AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs, + [AC_TRY_LINK([#include <sys/types.h> +#include <sys/statvfs.h>], + [struct statvfs fsd; statvfs (0, &fsd);], + fu_cv_sys_stat_statvfs=yes, + fu_cv_sys_stat_statvfs=no)]) + if test $fu_cv_sys_stat_statvfs = yes; then + space=yes + AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available]) + fi +fi + # Test for statvfs64. if test $space = no; then # SVR4 @@ -5264,26 +5284,6 @@ if test $space = no; then fi fi -# Perform only the link test since it seems there are no variants of the -# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) -# because that got a false positive on SCO OSR5. Adding the declaration -# of a `struct statvfs' causes this test to fail (as it should) on such -# systems. That system is reported to work fine with STAT_STATFS4 which -# is what it gets when this test fails. -if test $space = no; then - # SVR4 - AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs, - [AC_TRY_LINK([#include <sys/types.h> -#include <sys/statvfs.h>], - [struct statvfs fsd; statvfs (0, &fsd);], - fu_cv_sys_stat_statvfs=yes, - fu_cv_sys_stat_statvfs=no)]) - if test $fu_cv_sys_stat_statvfs = yes; then - space=yes - AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available]) - fi -fi - # smbd/statvfs.c assumes that statvfs.f_fsid is an integer. # This is not the case on ancient Linux systems. |