mirror of
https://github.com/ziglang/zig.git
synced 2025-12-20 05:03:06 +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
396 B
C
15 lines
396 B
C
#define _GNU_SOURCE
|
|
#include <sys/stat.h>
|
|
#include <sys/time.h>
|
|
#include <fcntl.h>
|
|
|
|
int lutimes(const char *filename, const struct timeval tv[2])
|
|
{
|
|
struct timespec times[2];
|
|
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 utimensat(AT_FDCWD, filename, times, AT_SYMLINK_NOFOLLOW);
|
|
}
|