summaryrefslogtreecommitdiff
path: root/userland/libc/unistd/ftruncate.c
diff options
context:
space:
mode:
Diffstat (limited to 'userland/libc/unistd/ftruncate.c')
-rw-r--r--userland/libc/unistd/ftruncate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/userland/libc/unistd/ftruncate.c b/userland/libc/unistd/ftruncate.c
new file mode 100644
index 0000000..cf35944
--- /dev/null
+++ b/userland/libc/unistd/ftruncate.c
@@ -0,0 +1,6 @@
+#include <syscall.h>
+#include <unistd.h>
+
+int ftruncate(int fildes, size_t length) {
+ RC_ERRNO(syscall(SYS_FTRUNCATE, fildes, length, 0, 0, 0));
+}