about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2019-02-11 10:35:52 +0100
committerLeah Neukirchen <leah@vuxu.org>2019-02-11 10:35:52 +0100
commit085138d6a25a8269c3fcf27472f26f4508f8cb2e (patch)
tree96639294f49ef56c92b7a92e6cd30b81c227e89e
parentcb0ffbf6adbddc6be47455dce6b37bff85cb9272 (diff)
downloadmblaze-085138d6a25a8269c3fcf27472f26f4508f8cb2e.tar.gz
mblaze-085138d6a25a8269c3fcf27472f26f4508f8cb2e.tar.xz
mblaze-085138d6a25a8269c3fcf27472f26f4508f8cb2e.zip
mdeliver: work around macOS, which doesn't implement POSIX.1-2008 stat fields
-rw-r--r--mdeliver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mdeliver.c b/mdeliver.c
index 4bff47c..f202420 100644
--- a/mdeliver.c
+++ b/mdeliver.c
@@ -225,7 +225,11 @@ try_again:
 		if (preserve_mtime) {
 			const struct timespec times[2] = {
 				{ tv.tv_sec, tv.tv_usec * 1000L },
+#if (defined(__APPLE__) && defined(__MACH__))
+			        st.st_mtimespec
+#else /* POSIX.1-2008 */
 				st.st_mtim
+#endif
 			};
 			utimensat(AT_FDCWD, tmp, times, 0);
 		}