summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-01-12 00:43:26 +0100
committerGünther Deschner <gd@samba.org>2011-01-12 01:44:22 +0100
commit4412eb9d008d259cebafa7062d4826d69e67d89c (patch)
tree05f631106e2d150e7ad89ea10ac0847b0d5d47d9
parente723de8fa181a1fca397c0b2e4e7d07cddcef921 (diff)
downloadsamba-4412eb9d008d259cebafa7062d4826d69e67d89c.tar.gz
samba-4412eb9d008d259cebafa7062d4826d69e67d89c.tar.bz2
samba-4412eb9d008d259cebafa7062d4826d69e67d89c.zip
s3-waf: more fallocate checks stolen from autoconf.
Guenther
-rw-r--r--source3/wscript30
1 files changed, 30 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript
index 3e83c12f28..561f65dd70 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -88,6 +88,7 @@ def configure(conf):
conf.ADD_LDFLAGS("-Wl,--export-dynamic", testflags=True)
conf.CHECK_HEADERS('execinfo.h libexc.h libunwind.h netdb.h')
+ conf.CHECK_HEADERS('linux/falloc.h')
conf.CHECK_FUNCS('getcwd fchown chmod fchmod mknod mknod64')
conf.CHECK_FUNCS('strtol strchr strupr chflags')
@@ -335,6 +336,35 @@ return acl_get_perm_np(permset_d, perm);
headers='sys/types.h sys/statfs.h',
execute=True)
+ if conf.CONFIG_SET('HAVE_FALLOCATE'):
+ conf.CHECK_CODE('''
+ #if defined(HAVE_UNISTD_H)
+ #include <unistd.h>
+ #endif
+ #include <sys/types.h>
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ #if defined(HAVE_LINUX_FALLOC_H)
+ #include <linux/falloc.h>
+ #endif
+ int ret = fallocate(0, FALLOC_FL_KEEP_SIZE, 0, 10);''',
+ 'HAVE_LINUX_FALLOCATE',
+ msg="Checking whether the Linux 'fallocate' function is available")
+ if conf.CONFIG_SET('HAVE_FALLOCATE64'):
+ conf.CHECK_CODE('''
+ #if defined(HAVE_UNISTD_H)
+ #include <unistd.h>
+ #endif
+ #include <sys/types.h>
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ #if defined(HAVE_LINUX_FALLOC_H)
+ #include <linux/falloc.h>
+ #endif
+ int ret = fallocate64(0, FALLOC_FL_KEEP_SIZE, 0, 10);''',
+ 'HAVE_LINUX_FALLOCATE64',
+ msg="Checking whether the Linux 'fallocate64' function is available")
+
default_static_modules=TO_LIST('''pdb_smbpasswd pdb_tdbsam pdb_wbc_sam pdb_ldap
auth_sam auth_unix auth_winbind auth_wbc auth_server
auth_domain auth_builtin auth_netlogond vfs_default