X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Funistd%2Ftruncate.c;h=322349d2aeebe0e38a512334f3f51f710d7c1fc8;hb=3075f7e847b0c717959054b86360722326dbde1e;hp=f75e824e614c9c6142fd3d5243b0a890a3d2dc0a;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;p=musl diff --git a/src/unistd/truncate.c b/src/unistd/truncate.c index f75e824e..322349d2 100644 --- a/src/unistd/truncate.c +++ b/src/unistd/truncate.c @@ -4,12 +4,7 @@ int truncate(const char *path, off_t length) { - if (sizeof(long) == 8) - return syscall2(__NR_truncate, (long)path, length); - else { - union { long long ll; long l[2]; } u = { length }; - return syscall3(__NR_truncate64, (long)path, u.l[0], u.l[1]); - } + return syscall3(__NR_truncate, (long)path, SYSCALL_LL(length)); } LFS64(truncate);