mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-04-20 03:25:09 +02:00
fix: use st_mtimespec instead of st_mtim on macos
This commit is contained in:
parent
5263538a29
commit
3f75fd5a3a
1 changed files with 3 additions and 1 deletions
|
@ -206,8 +206,10 @@ static int64_t getModTime(const std::string &file) {
|
||||||
return INT64_MIN;
|
return INT64_MIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32)
|
||||||
return (int64_t)s.st_mtime * 1000000;
|
return (int64_t)s.st_mtime * 1000000;
|
||||||
|
#elif defined(__APPLE__) || defined(__NetBSD__)
|
||||||
|
return (int64_t)s.st_mtimespec.tv_sec * 1000000 + s.st_mtimespec.tv_nsec / 1000;
|
||||||
#else
|
#else
|
||||||
return (int64_t)s.st_mtim.tv_sec * 1000000 + s.st_mtim.tv_nsec / 1000;
|
return (int64_t)s.st_mtim.tv_sec * 1000000 + s.st_mtim.tv_nsec / 1000;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue