summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2016-05-04 00:50:20 -0700
committerMichael Pavone <pavone@retrodev.com>2016-05-04 00:50:20 -0700
commit16d9a8bff8b700b50a5e2f68af3b50d1515043be (patch)
tree9ea65942943e730ff0ad1131c305631296ee8d84
parentdd54326136cdefda96bce7cdff31d0938162377b (diff)
Fix OS X build
-rw-r--r--util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util.c b/util.c
index 7714557..75913a4 100644
--- a/util.c
+++ b/util.c
@@ -467,7 +467,11 @@ time_t get_modification_time(char *path)
if (stat(path, &st)) {
return 0;
}
+#ifdef __APPLE__
+ return st.st_mtimespec.tv_sec;
+#else
return st.st_mtim.tv_sec;
+#endif
}
int ensure_dir_exists(char *path)