aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Conf.cpp12
-rw-r--r--src/FileUtil.cpp2
2 files changed, 12 insertions, 2 deletions
diff --git a/src/Conf.cpp b/src/Conf.cpp
index bad3c01..6645913 100644
--- a/src/Conf.cpp
+++ b/src/Conf.cpp
@@ -532,6 +532,8 @@ namespace sibs
case PLATFORM_LINUX64: return "linux64";
case PLATFORM_WIN32: return "win32";
case PLATFORM_WIN64: return "win64";
+ case PLATFORM_MACOS32: return "macos32";
+ case PLATFORM_MACOS64: return "macos64";
default: return nullptr;
}
}
@@ -801,11 +803,19 @@ namespace sibs
{
platforms.push_back(PLATFORM_WIN64);
}
+ else if (platform.equals("macos32"))
+ {
+ platforms.push_back(PLATFORM_MACOS32);
+ }
+ else if (platform.equals("macos64"))
+ {
+ platforms.push_back(PLATFORM_MACOS64);
+ }
else
{
string errMsg = "package.platforms contains invalid platform \"";
errMsg += string(platform.data, platform.size);
- errMsg += "\". Expected platform to be one of: any, linux32, linux64, win32 or win64";
+ errMsg += "\". Expected platform to be one of: any, linux32, linux64, win32, win64, macos32 or macos64";
throw ParserException(errMsg);
}
}
diff --git a/src/FileUtil.cpp b/src/FileUtil.cpp
index 222edbb..e3d4c3c 100644
--- a/src/FileUtil.cpp
+++ b/src/FileUtil.cpp
@@ -129,7 +129,7 @@ namespace sibs
{
struct stat64 fileStat;
if (stat64(path, &fileStat) == 0)
- return Result<u64>::Ok(fileStat.st_mtim.tv_sec);
+ return Result<u64>::Ok(fileStat.st_mtime);
else
{
string errMsg = "File not found: ";