mallocng/aligned_alloc: check for malloc failure
[musl] / src / unistd / truncate.c
index 322349d..9729680 100644 (file)
@@ -1,10 +1,9 @@
 #include <unistd.h>
 #include "syscall.h"
-#include "libc.h"
 
 int truncate(const char *path, off_t length)
 {
-       return syscall3(__NR_truncate, (long)path, SYSCALL_LL(length));
+       return syscall(SYS_truncate, path, __SYSCALL_LL_O(length));
 }
 
-LFS64(truncate);
+weak_alias(truncate, truncate64);