projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
math: use float_t and double_t in scalbnf and scalbn
[musl]
/
src
/
unistd
/
fchdir.c
1
#include <unistd.h>
2
#include <errno.h>
3
#include "syscall.h"
4
5
void __procfdname(char *, unsigned);
6
7
int fchdir(int fd)
8
{
9
int ret = __syscall(SYS_fchdir, fd);
10
if (ret != -EBADF || fd < 0) return __syscall_ret(ret);
11
12
char buf[15+3*sizeof(int)];
13
__procfdname(buf, fd);
14
return syscall(SYS_chdir, buf);
15
}