summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2018-02-28 20:09:44 +0100
committerFabian Groffen <grobian@gentoo.org>2018-02-28 20:09:44 +0100
commit7b47cf64b5db7ce03f7a41e24b09182961444197 (patch)
tree66e041b876f298071d7c8221dd76d139399da2c1
parentscripts/rsync-generation/hashgen: allow verification to be massively parallel (diff)
downloadprefix-7b47cf64.tar.gz
prefix-7b47cf64.tar.bz2
prefix-7b47cf64.zip
script/rsync-generation/hashgen: allow compilation on Darwin
-rw-r--r--scripts/rsync-generation/hashgen.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/rsync-generation/hashgen.c b/scripts/rsync-generation/hashgen.c
index b2ba8b0f5a..833c8e7205 100644
--- a/scripts/rsync-generation/hashgen.c
+++ b/scripts/rsync-generation/hashgen.c
@@ -99,6 +99,10 @@ hex_hash(char *out, const unsigned char *buf, const int length)
static inline void
update_times(struct timeval *tv, struct stat *s)
{
+#ifdef __MACH__
+# define st_mtim st_mtimespec
+# define st_atim st_atimespec
+#endif
if (tv[1].tv_sec < s->st_mtim.tv_sec ||
(tv[1].tv_sec == s->st_mtim.tv_sec &&
tv[1].tv_usec < s->st_mtim.tv_nsec / 1000))