summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-05-22 00:14:29 +1000
committerAndrew Bartlett <abartlet@samba.org>2013-05-27 11:56:48 +1000
commit2a4eaa3241fc4ccb79359ea4e4d511754a84d46b (patch)
tree8fe34c32ee517a5e85cb86ba28eccce51b3c74c8 /lib/util
parentc6673b96a59e38031da6654580250bbc58766cfd (diff)
downloadsamba-2a4eaa3241fc4ccb79359ea4e4d511754a84d46b.tar.gz
samba-2a4eaa3241fc4ccb79359ea4e4d511754a84d46b.tar.bz2
samba-2a4eaa3241fc4ccb79359ea4e4d511754a84d46b.zip
build: Rework BSD_STYLE_STATVFS check to match autoconf build
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/wscript_configure22
1 files changed, 10 insertions, 12 deletions
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 <sys/param.h>
- #endif
- #ifdef HAVE_SYS_MOUNT_H
- #include <sys/mount.h>
- #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',