diff options
author | Björn Jacke <bj@sernet.de> | 2009-12-08 21:13:19 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-12-14 08:28:55 +0100 |
commit | 3647eb0bd2a77ab1182b52d6e113f60b30b8ab59 (patch) | |
tree | c676897f824d9b5055ac19a91fa3aca5a523b1f3 /source3/lib | |
parent | 925e825944c27f9f11796df8d7937a30537a3869 (diff) | |
download | samba-3647eb0bd2a77ab1182b52d6e113f60b30b8ab59.tar.gz |
s3: make sys_posix_fallocate more generic
this is in preparation for other preallocation methods to be introduced.
(cherry picked from commit 39be2d18a24176b9300834a0552180cdfb11ca5f)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/system.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c index a2dd89982e2..a58d9037a79 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. |