diff options
Diffstat (limited to 'libc-top-half/musl/src/stat/fstat.c')
-rw-r--r-- | libc-top-half/musl/src/stat/fstat.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/stat/fstat.c b/libc-top-half/musl/src/stat/fstat.c new file mode 100644 index 0000000..9bbb46d --- /dev/null +++ b/libc-top-half/musl/src/stat/fstat.c @@ -0,0 +1,15 @@ +#define _BSD_SOURCE +#include <sys/stat.h> +#include <errno.h> +#include <fcntl.h> +#include "syscall.h" + +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 |