projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
make pthread_create return EAGAIN on resource failure, as required by POSIX
[oweals/musl.git]
/
src
/
unistd
/
ftruncate.c
1
#include <unistd.h>
2
#include "syscall.h"
3
#include "libc.h"
4
5
int ftruncate(int fd, off_t length)
6
{
7
if (sizeof(long) == 8)
8
return syscall2(__NR_ftruncate, fd, length);
9
else {
10
union { long long ll; long l[2]; } u = { length };
11
return syscall3(__NR_ftruncate64, fd, u.l[0], u.l[1]);
12
}
13
}
14
15
LFS64(ftruncate);