mirror of
https://github.com/ziglang/zig.git
synced 2025-12-14 18:23:12 +00:00
also start prefering NtDll API. so far: * NtQueryInformationFile * NtClose adds a performance workaround for windows unicode conversion. but that should probably be removed before merging
15 lines
359 B
C
Vendored
15 lines
359 B
C
Vendored
#define _GNU_SOURCE
|
|
#include <sys/stat.h>
|
|
#include <sys/time.h>
|
|
|
|
int futimes(int fd, const struct timeval tv[2])
|
|
{
|
|
struct timespec times[2];
|
|
if (!tv) return futimens(fd, 0);
|
|
times[0].tv_sec = tv[0].tv_sec;
|
|
times[0].tv_nsec = tv[0].tv_usec * 1000;
|
|
times[1].tv_sec = tv[1].tv_sec;
|
|
times[1].tv_nsec = tv[1].tv_usec * 1000;
|
|
return futimens(fd, times);
|
|
}
|