Update to compile on Mac OS (#26)

This commit is contained in:
Andrew Cox 2022-07-01 14:27:58 -07:00 committed by GitHub
parent 71fb865112
commit 600a20cde6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -192,8 +192,10 @@ static int64_t getModTime(const std::string &file) {
return INT64_MIN;
}
#ifdef _WIN32
#if defined(_WIN32)
return (int64_t)s.st_mtime * 1000000;
#elif defined(__APPLE__)
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