]> git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/compat/time32/stat_time32.c
Update to musl 1.2.0.
[wasi-libc.git] / libc-top-half / musl / compat / time32 / stat_time32.c
1 #include "time32.h"
2 #include <time.h>
3 #include <string.h>
4 #include <sys/stat.h>
5 #include <stddef.h>
6
7 struct stat32;
8
9 int __stat_time32(const char *restrict path, struct stat32 *restrict st32)
10 {
11 struct stat st;
12 int r = stat(path, &st);
13 if (!r) memcpy(st32, &st, offsetof(struct stat, st_atim));
14 return r;
15 }
16
17 weak_alias(stat, stat64);