Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/rsync-generation/
Date: Wed, 28 Feb 2018 19:09:56
Message-Id: 1519844984.7b47cf64b5db7ce03f7a41e24b09182961444197.grobian@gentoo
1 commit: 7b47cf64b5db7ce03f7a41e24b09182961444197
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 28 19:09:44 2018 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 28 19:09:44 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=7b47cf64
7
8 script/rsync-generation/hashgen: allow compilation on Darwin
9
10 scripts/rsync-generation/hashgen.c | 4 ++++
11 1 file changed, 4 insertions(+)
12
13 diff --git a/scripts/rsync-generation/hashgen.c b/scripts/rsync-generation/hashgen.c
14 index b2ba8b0f5a..833c8e7205 100644
15 --- a/scripts/rsync-generation/hashgen.c
16 +++ b/scripts/rsync-generation/hashgen.c
17 @@ -99,6 +99,10 @@ hex_hash(char *out, const unsigned char *buf, const int length)
18 static inline void
19 update_times(struct timeval *tv, struct stat *s)
20 {
21 +#ifdef __MACH__
22 +# define st_mtim st_mtimespec
23 +# define st_atim st_atimespec
24 +#endif
25 if (tv[1].tv_sec < s->st_mtim.tv_sec ||
26 (tv[1].tv_sec == s->st_mtim.tv_sec &&
27 tv[1].tv_usec < s->st_mtim.tv_nsec / 1000))