summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/unistd/truncate.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/unistd/truncate.c')
-rw-r--r--libc-top-half/musl/src/unistd/truncate.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/unistd/truncate.c b/libc-top-half/musl/src/unistd/truncate.c
new file mode 100644
index 0000000..9729680
--- /dev/null
+++ b/libc-top-half/musl/src/unistd/truncate.c
@@ -0,0 +1,9 @@
+#include <unistd.h>
+#include "syscall.h"
+
+int truncate(const char *path, off_t length)
+{
+ return syscall(SYS_truncate, path, __SYSCALL_LL_O(length));
+}
+
+weak_alias(truncate, truncate64);