fstat.c 255 B

12345678910111213
  1. #define _BSD_SOURCE
  2. #include <sys/stat.h>
  3. #include <errno.h>
  4. #include <fcntl.h>
  5. #include "syscall.h"
  6. int fstat(int fd, struct stat *st)
  7. {
  8. if (fd<0) return __syscall_ret(-EBADF);
  9. return fstatat(fd, "", st, AT_EMPTY_PATH);
  10. }
  11. weak_alias(fstat, fstat64);