Remove building with NOCRYPTO option
[minix.git] / minix / lib / libc / sys / ftruncate.c
blob1e4d671423153a1a5ab6e996d3b416d005e5be24
1 #include <sys/cdefs.h>
2 #include "namespace.h"
3 #include <lib.h>
5 #include <minix/u64.h>
6 #include <string.h>
7 #include <unistd.h>
9 #ifdef __weak_alias
10 __weak_alias(ftruncate, _ftruncate)
11 #endif
13 int ftruncate(int _fd, off_t _length)
15 message m;
17 memset(&m, 0, sizeof(m));
18 m.m_lc_vfs_truncate.offset = _length;
19 m.m_lc_vfs_truncate.fd = _fd;
21 return(_syscall(VFS_PROC_NR, VFS_FTRUNCATE, &m));