projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update release info for 0.9.0
[musl]
/
src
/
unistd
/
ftruncate.c
diff --git
a/src/unistd/ftruncate.c
b/src/unistd/ftruncate.c
index
e0b2f4b
..
467135f
100644
(file)
--- a/
src/unistd/ftruncate.c
+++ b/
src/unistd/ftruncate.c
@@
-4,12
+4,7
@@
int ftruncate(int fd, off_t length)
{
int ftruncate(int fd, off_t length)
{
- if (sizeof(long) == 8)
- return syscall2(__NR_ftruncate, fd, length);
- else {
- union { long long ll; long l[2]; } u = { length };
- return syscall3(__NR_ftruncate64, fd, u.l[0], u.l[1]);
- }
+ return syscall(SYS_ftruncate, fd, __SYSCALL_LL_O(length));
}
LFS64(ftruncate);
}
LFS64(ftruncate);