summaryrefslogtreecommitdiffstats
path: root/newlib/libc/sys/sh/truncate.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/sys/sh/truncate.c')
-rw-r--r--newlib/libc/sys/sh/truncate.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/newlib/libc/sys/sh/truncate.c b/newlib/libc/sys/sh/truncate.c
new file mode 100644
index 000000000..5ca48d3c6
--- /dev/null
+++ b/newlib/libc/sys/sh/truncate.c
@@ -0,0 +1,9 @@
+#include <_ansi.h>
+#include <sys/types.h>
+#include "sys/syscall.h"
+
+int
+truncate (const char *path, off_t length)
+{
+ return __trap34 (SYS_truncate, path, length, 0);
+}