summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2015-02-19 15:53:56 +0100
committerJeremy Allison <jra@samba.org>2015-03-09 21:27:07 +0100
commit76fff2befe6613416e80f891ccb1521609e19169 (patch)
tree2969528afb4ff8ebe613404f667dc8d2b35fc069
parentb5a635fb0ab0967e375281dd003cd7eb123f73fd (diff)
downloadsamba-76fff2befe6613416e80f891ccb1521609e19169.tar.gz
samba-76fff2befe6613416e80f891ccb1521609e19169.tar.xz
samba-76fff2befe6613416e80f891ccb1521609e19169.zip
build: check for SEEK_HOLE and SEEK_DATA support
SEEK_HOLE and SEEK_DATA will be used in the implementation of FSCTL_QUERY_ALLOCATED_RANGES support. "SEEK_DATA and SEEK_HOLE are nonstandard extensions also present in Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the next POSIX revision (Issue 8)." With Linux they are supported on: - Btrfs (since Linux 3.1) - OCFS (since Linux 3.2) - XFS (since Linux 3.5) - ext4 (since Linux 3.8) - tmpfs (since Linux 3.8) Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/wscript8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript
index 7e02b31f37..90f5d7ff20 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -522,6 +522,14 @@ return acl_get_perm_np(permset_d, perm);
'HAVE_FALLOC_FL_PUNCH_HOLE',
msg="Checking whether Linux 'fallocate' supports hole-punching",
headers='unistd.h sys/types.h fcntl.h linux/falloc.h')
+
+ conf.CHECK_CODE('''
+ int ret = lseek(0, 0, SEEK_HOLE);
+ ret = lseek(0, 0, SEEK_DATA);''',
+ 'HAVE_LSEEK_HOLE_DATA',
+ msg="Checking whether lseek supports hole/data seeking",
+ headers='unistd.h sys/types.h')
+
conf.CHECK_CODE('''
ssize_t err = readahead(0,0,0x80000);''',
'HAVE_LINUX_READAHEAD',