From: Kjetil Barvik Date: Thu, 19 Feb 2009 20:08:28 +0000 (+0100) Subject: fix compile error when USE_NSEC is defined X-Git-Tag: v1.6.3-rc0~147^2~9 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8cd6192e16d8bf590afa1105c840b72106d72941;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c index 67fb80ec4..3b210c7fd 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");