Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r--winsup/cygwin/syscalls.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index c3c17d604..b2e6ba16c 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -2997,7 +2997,7 @@ posix_fallocate (int fd, off_t offset, off_t len)
{
cygheap_fdget cfd (fd);
if (cfd >= 0)
- res = cfd->ftruncate (offset + len, false);
+ res = cfd->fallocate (0, offset, len);
else
res = EBADF;
if (res == EISDIR)
@@ -3014,7 +3014,7 @@ ftruncate (int fd, off_t length)
cygheap_fdget cfd (fd);
if (cfd >= 0)
{
- res = cfd->ftruncate (length, true);
+ res = cfd->fallocate (__FALLOC_FL_TRUNCATE, 0, length);
if (res)
{
if (res == ENODEV)