From 2a4eaa3241fc4ccb79359ea4e4d511754a84d46b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 22 May 2013 00:14:29 +1000 Subject: build: Rework BSD_STYLE_STATVFS check to match autoconf build Reviewed-by: Jelmer Vernooij --- lib/util/wscript_configure | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'lib/util') diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure index 3cb2ffcfae..1270ab3f41 100644 --- a/lib/util/wscript_configure +++ b/lib/util/wscript_configure @@ -58,18 +58,16 @@ if not found_statfs: print("FATAL: Failed to find a statfs method") raise -if conf.CONFIG_SET('STAT_STATFS2_BSIZE'): - conf.CHECK_CODE("""#ifdef HAVE_SYS_PARAM_H - #include - #endif - #ifdef HAVE_SYS_MOUNT_H - #include - #endif - struct statfs fsd; fsd.f_iosize = 0;""", - define='BSD_STYLE_STATVFS', - msg='Checking for *bsd style statfs with statfs.f_iosize', - execute=False, - local_include=False) +conf.CHECK_CODE("""struct statfs fsd; + fsd.f_bsize = 0; + fsd.f_iosize = 0; + return (statfs (".", &fsd)); + """, + headers='sys/param.h sys/mount.h sys/vfs.h', + define='BSD_STYLE_STATVFS', + msg='Checking for *bsd style statfs with statfs.f_iosize', + execute=True, + local_include=False) conf.CHECK_CODE('struct statvfs buf; buf.f_fsid = 0', define='HAVE_FSID_INT', -- cgit