solaris file allocation support

This commit is contained in:
Arvid Norberg 2011-09-08 23:08:37 +00:00
parent 012bad4b18
commit 09c235c936
1 changed files with 13 additions and 0 deletions

View File

@ -1669,6 +1669,19 @@ namespace libtorrent
}
#endif // F_PREALLOCATE
#ifdef F_ALLOCSP64
flock64 fl64;
fl64.l_whence = SEEK_SET;
fl64.l_start = 0;
fl64.l_len = s;
if (fcntl(native_handle(), F_ALLOCSP64, &fl64) < 0)
{
ec.assign(errno, get_posix_category());
return false;
}
#endif // F_ALLOCSP64
#if defined TORRENT_LINUX || TORRENT_HAS_FALLOCATE
int ret;
#endif