mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-04-21 03:45:07 +02:00
update stat.h syntax for Mac OSX SDK
This commit is contained in:
parent
71fb865112
commit
631b27e914
1 changed files with 6 additions and 1 deletions
|
@ -194,9 +194,14 @@ static int64_t getModTime(const std::string &file) {
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
return (int64_t)s.st_mtime * 1000000;
|
return (int64_t)s.st_mtime * 1000000;
|
||||||
|
#else
|
||||||
|
#ifdef __APPLE__
|
||||||
|
// stat.h syntax has changed on MacOSX SDK since at least 11.3
|
||||||
|
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
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool checkRegion(int64_t changed, const std::string &file) {
|
static bool checkRegion(int64_t changed, const std::string &file) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue