repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
iconv: add aliases for GBK
[musl.git]
/
src
/
stat
/
fstat.c
blob
fd28b8ac405a5601bbfa6cdf5bb562f2f918053b
1
#define _BSD_SOURCE
2
#include <sys/stat.h>
3
#include <errno.h>
4
#include <fcntl.h>
5
#include
"syscall.h"
6
7
int
__fstat
(
int
fd
,
struct
stat
*
st
)
8
{
9
if
(
fd
<
0
)
return
__syscall_ret
(-
EBADF
);
10
return
__fstatat
(
fd
,
""
,
st
,
AT_EMPTY_PATH
);
11
}
12
13
weak_alias
(
__fstat
,
fstat
);