summaryrefslogtreecommitdiff
path: root/builtin-fetch-pack.c
diff options
context:
space:
mode:
authorKjetil Barvik <barvik@broadpark.no>2009-02-19 21:08:28 +0100
committerJunio C Hamano <gitster@pobox.com>2009-02-19 21:27:14 -0800
commit8cd6192e16d8bf590afa1105c840b72106d72941 (patch)
tree0912da2a2553727b44e8118febe04032ef5da13e /builtin-fetch-pack.c
parent36419c8ee41cecadf67dfeab2808ff2e5025ca52 (diff)
downloadgit-8cd6192e16d8bf590afa1105c840b72106d72941.tar.gz
fix compile error when USE_NSEC is defined
'struct cache' does not have a 'usec' member, but a 'unsigned int nsec' member. Simmilar 'struct stat' does not have a 'st_mtim.usec' member, and we should instead use 'st_mtim.tv_nsec'. Signed-off-by: Kjetil Barvik <barvik@broadpark.no> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-fetch-pack.c')
-rw-r--r--builtin-fetch-pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 67fb80ec48..3b210c7fdf 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -802,14 +802,14 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
mtime.sec = st.st_mtime;
#ifdef USE_NSEC
- mtime.usec = st.st_mtim.usec;
+ mtime.nsec = st.st_mtim.tv_nsec;
#endif
if (stat(shallow, &st)) {
if (mtime.sec)
die("shallow file was removed during fetch");
} else if (st.st_mtime != mtime.sec
#ifdef USE_NSEC
- || st.st_mtim.usec != mtime.usec
+ || st.st_mtim.tv_nsec != mtime.nsec
#endif
)
die("shallow file was changed during fetch");