projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
only use memcpy realloc to shrink if an exact-sized free chunk exists
[oweals/musl.git]
/
src
/
stat
/
fstat.c
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
#if !_REDIR_TIME64
14
weak_alias(fstat, fstat64);
15
#endif