summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2015-02-09 19:39:06 +0100
committerJeremy Allison <jra@samba.org>2015-03-09 21:27:07 +0100
commit762f9cbe60fe3a5ee6f528276c095ad736c776ee (patch)
tree06194489326b407c4759fef13c2da6d67edaf41f
parent12c0b6bf4055b0466d0a2962d5ac34ac60357de3 (diff)
downloadsamba-762f9cbe60fe3a5ee6f528276c095ad736c776ee.tar.gz
samba-762f9cbe60fe3a5ee6f528276c095ad736c776ee.tar.xz
samba-762f9cbe60fe3a5ee6f528276c095ad736c776ee.zip
build: check for fallocate hole-punch support
Add a configure time check for the FALLOC_FL_PUNCH_HOLE Linux specific fallocate() flag. It's been around since 2.6.38. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source3/wscript5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/wscript b/source3/wscript
index 2c03c304db..7e02b31f37 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -517,6 +517,11 @@ return acl_get_perm_np(permset_d, perm);
'HAVE_LINUX_FALLOCATE',
msg="Checking whether the Linux 'fallocate' function is available",
headers='unistd.h sys/types.h fcntl.h linux/falloc.h')
+ conf.CHECK_CODE('''
+ int ret = fallocate(0, FALLOC_FL_PUNCH_HOLE, 0, 10);''',
+ '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('''
ssize_t err = readahead(0,0,0x80000);''',
'HAVE_LINUX_READAHEAD',