]>
git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/src/stat/futimesat.c
5 #ifdef __wasilibc_unmodified_upstream // WASI has no syscall
9 int __futimesat(int dirfd
, const char *pathname
, const struct timeval times
[2])
11 struct timespec ts
[2];
15 if (times
[i
].tv_usec
>= 1000000ULL)
16 #ifdef __wasilibc_unmodified_upstream // WASI has no syscall
17 return __syscall_ret(-EINVAL
);
22 ts
[i
].tv_sec
= times
[i
].tv_sec
;
23 ts
[i
].tv_nsec
= times
[i
].tv_usec
* 1000;
26 return utimensat(dirfd
, pathname
, times
? ts
: 0, 0);
29 weak_alias(__futimesat
, futimesat
);