diff --git a/src/MinedMap.cpp b/src/MinedMap.cpp index e4993a0..ddb165a 100644 --- a/src/MinedMap.cpp +++ b/src/MinedMap.cpp @@ -195,7 +195,12 @@ static int64_t getModTime(const std::string &file) { #ifdef _WIN32 return (int64_t)s.st_mtime * 1000000; #else - return (int64_t)s.st_mtim.tv_sec * 1000000 + s.st_mtim.tv_nsec / 1000; + #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 + return (int64_t)s.st_mtim.tv_sec * 1000000 + s.st_mtim.tv_nsec / 1000; + #endif #endif }