From 0c09753cf50bbd9639c50af61b1cedf50da5f1c6 Mon Sep 17 00:00:00 2001 From: Marius Ungureanu Date: Mon, 25 Jan 2016 14:06:15 +0200 Subject: [PATCH 1/2] Fix the build when defining USE_NSEC --- src/index.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.h b/src/index.h index a64c645b3..8b9b49498 100644 --- a/src/index.h +++ b/src/index.h @@ -92,7 +92,7 @@ GIT_INLINE(bool) git_index_entry_newer_than_index( /* If the timestamp is the same or newer than the index, it's racy */ #if defined(GIT_USE_NSEC) - if ((int32_t)index->stamp.tv_sec < entry->mtime.seconds) + if ((int32_t)index->stamp.mtime.tv_sec < entry->mtime.seconds) return true; else if ((int32_t)index->stamp.mtime.tv_sec > entry->mtime.seconds) return false; From 9447b9e55a498b93668e43cf58eef33c29cc40df Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 9 Feb 2016 10:40:33 -0800 Subject: [PATCH 2/2] xplat: use st_mtimespec everywhere on mac --- src/common.h | 6 ++++++ src/fileops.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common.h b/src/common.h index 2913baa92..bc4bdd856 100644 --- a/src/common.h +++ b/src/common.h @@ -62,6 +62,12 @@ # endif #define GIT_STDLIB_CALL +#ifdef GIT_USE_STAT_ATIMESPEC +# define st_atim st_atimespec +# define st_ctim st_ctimespec +# define st_mtim st_mtimespec +#endif + # include #endif diff --git a/src/fileops.c b/src/fileops.c index 6aafd06b6..150333d7a 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -13,12 +13,6 @@ #include "win32/findfile.h" #endif -#ifdef GIT_USE_STAT_ATIMESPEC -#define st_atim st_atimespec -#define st_ctim st_ctimespec -#define st_mtim st_mtimespec -#endif - GIT__USE_STRMAP int git_futils_mkpath2file(const char *file_path, const mode_t mode)