projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix broken struct shmid_ds on powerpc (32-bit)
[musl]
/
src
/
stat
/
fstat.c
diff --git
a/src/stat/fstat.c
b/src/stat/fstat.c
index
d2a828f
..
9bbb46d
100644
(file)
--- a/
src/stat/fstat.c
+++ b/
src/stat/fstat.c
@@
-6,7
+6,10
@@
int fstat(int fd, struct stat *st)
{
+ if (fd<0) return __syscall_ret(-EBADF);
return fstatat(fd, "", st, AT_EMPTY_PATH);
}
+#if !_REDIR_TIME64
weak_alias(fstat, fstat64);
+#endif