clean up sloppy nested inclusion from pthread_impl.h
[oweals/musl.git] / src / unistd / ftruncate.c
index e0b2f4bb4c198c15ac2e52401c985d0c9152152b..467135f009971316101b6e38e5384707baa508c4 100644 (file)
@@ -4,12 +4,7 @@
 
 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);