macOS fixes

This commit is contained in:
Jack Andersen
2018-08-27 17:48:53 -10:00
parent 33d2cc9ef1
commit 4fc5dfdc76
9 changed files with 591 additions and 428 deletions

View File

@@ -512,8 +512,12 @@ static void SetAudioFileTime(const SystemString& path, const Sstat& stat)
#if _WIN32
__utimbuf64 times = { stat.st_atime, stat.st_mtime };
_wutime64(path.c_str(), &times);
#else
#if __APPLE__
struct timespec times[] = { stat.st_atimespec, stat.st_mtimespec };
#else
struct timespec times[] = { stat.st_atim, stat.st_mtim };
#endif
utimensat(AT_FDCWD, path.c_str(), times, 0);
#endif
}