fstatat_time32.c 344 B

123456789101112131415
  1. #include "time32.h"
  2. #include <time.h>
  3. #include <string.h>
  4. #include <sys/stat.h>
  5. #include <stddef.h>
  6. struct stat32;
  7. int __fstatat_time32(int fd, const char *restrict path, struct stat32 *restrict st32, int flag)
  8. {
  9. struct stat st;
  10. int r = fstatat(fd, path, &st, flag);
  11. if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim));
  12. return r;
  13. }