summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/ftruncate.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/ftruncate.c')
-rw-r--r--libc/sysdeps/linux/common/ftruncate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/ftruncate.c b/libc/sysdeps/linux/common/ftruncate.c
index b9a69714f..637050777 100644
--- a/libc/sysdeps/linux/common/ftruncate.c
+++ b/libc/sysdeps/linux/common/ftruncate.c
@@ -15,7 +15,11 @@
int ftruncate(int fd, __off_t length)
{
# if __WORDSIZE == 32
+# if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__)
+ return INLINE_SYSCALL(ftruncate64, 4, fd, 0, OFF_HI_LO(length));
+# else
return INLINE_SYSCALL(ftruncate64, 3, fd, OFF_HI_LO(length));
+# endif
# else
return ftruncate64(fd, length);
# endif