[PATCH] build: don't execute statfs and f_fsid checks

Andrew Bartlett abartlet at samba.org
Fri Feb 7 10:51:23 MST 2014


On Mon, 2014-01-20 at 10:19 -0300, Gustavo Zacarias wrote:
> There's no need to execute the statfs and statfs.f_fsid checks, the
> return value is of no consequence since it's undefined in some
> platforms and prevents cross-compiling.
> 
> Signed-off-by: Gustavo Zacarias <gustavo at zacarias.com.ar>
> ---
>  source3/wscript | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/source3/wscript b/source3/wscript
> index 501707b..2d0a62e 100644
> --- a/source3/wscript
> +++ b/source3/wscript
> @@ -468,8 +468,7 @@ return acl_get_perm_np(permset_d, perm);
>      conf.CHECK_CODE('struct statfs fsd; fsid_t fsid = fsd.f_fsid; return statfs(".", &fsd);',
>                      'HAVE_STATFS_F_FSID',
>                      msg="vfs_fileid: checking for statfs() and struct statfs.f_fsid",
> -                    headers='sys/types.h sys/statfs.h',
> -                    execute=True)
> +                    headers='sys/types.h sys/statfs.h')
>  
>      if conf.CONFIG_SET('HAVE_FALLOCATE'):
>          conf.CHECK_CODE('''

The difficulty here is to understand why this code was executed in the
first place.  It was executed in the autoconf build, and an extensive
look into that codebase hasn't made it possible to find the rationale
there either. 

The other frustration is that this check is in a different spot to the
other statfs checks (under lib/util), some of which do seem to genuinely
need to be run.  (It seems to duplicate part of those other tests). 

In any case, what do you mean when you say it's undefined on some
platforms?

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba-technical mailing list