summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2009-12-08 21:13:19 +0100
committerBjörn Jacke <bj@sernet.de>2009-12-08 21:16:31 +0100
commit0d53ce7e072d3dc5208fd752c5d49ed313d1c752 (patch)
treedc8cbcf0e2c0cc244e7ff7dee23c83c41372deec /source3/lib
parente14fb8f913e35db96d8d7985e505f96150d9ce6b (diff)
downloadsamba-0d53ce7e072d3dc5208fd752c5d49ed313d1c752.tar.gz
samba-0d53ce7e072d3dc5208fd752c5d49ed313d1c752.tar.bz2
samba-0d53ce7e072d3dc5208fd752c5d49ed313d1c752.zip
s3: make sys_posix_fallocate more generic
this is in preparation for other preallocation methods to be introduced.
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/system.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index a2dd89982e..a58d9037a7 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -621,16 +621,16 @@ int sys_lstat(const char *fname,SMB_STRUCT_STAT *sbuf,
/*******************************************************************
An posix_fallocate() wrapper that will deal with 64 bit filesizes.
********************************************************************/
-#if (defined(HAVE_POSIX_FALLOCATE64) || defined(HAVE_POSIX_FALLOCATE)) && !defined(HAVE_BROKEN_POSIX_FALLOCATE)
int sys_posix_fallocate(int fd, SMB_OFF_T offset, SMB_OFF_T len)
{
-#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_POSIX_FALLOCATE64)
+#if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OFF64_T) && defined(HAVE_POSIX_FALLOCATE64) && !defined(HAVE_BROKEN_POSIX_FALLOCATE)
return posix_fallocate64(fd, offset, len);
-#else
+#elif defined(HAVE_POSIX_FALLOCATE) && !defined(HAVE_BROKEN_POSIX_FALLOCATE)
return posix_fallocate(fd, offset, len);
+#else
+ return ENOSYS;
#endif
}
-#endif
/*******************************************************************
An ftruncate() wrapper that will deal with 64 bit filesizes.