summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2018-08-29 22:50:22 +0200
committertomsmeding <tom.smeding@gmail.com>2018-08-29 22:50:22 +0200
commit9da9ab3e4517328ffe0fd0aaf23e2056b705ad76 (patch)
tree9f2a5afb74cf68d583e4c69575a1b2deeb0a0a15 /main.cpp
parent974a5a213bd780f5021c3e3d40ffad05e3c0a23e (diff)
Compile on mac
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 5a6c779..3a801ba 100644
--- a/main.cpp
+++ b/main.cpp
@@ -69,7 +69,11 @@ static int64_t fileLastModified(const string_view fname) {
perror("stat");
exit(1);
}
+#ifdef __APPLE__
+ return st.st_mtimespec.tv_sec * 1000000LL + st.st_mtimespec.tv_nsec / 1000;
+#else
return st.st_mtim.tv_sec * 1000000LL + st.st_mtim.tv_nsec / 1000;
+#endif
}
static int64_t gettimestamp() {