@matheusbsbs / matheus-bagliano / commits / 8cd6192e16
Fork 0

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>

Kjetil Barvik committed Feb 19, 2009 at 21:08 UTC 8cd6192e16d8bf590afa1105c840b72106d72941
1 file changed +2 -2
builtin-fetch-pack.c
+2 -2
@@ -802,14 +802,14 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
802
803 mtime.sec = st.st_mtime;
804 #ifdef USE_NSEC
805 - mtime.usec = st.st_mtim.usec;
805 + mtime.nsec = st.st_mtim.tv_nsec;
806 #endif
807 if (stat(shallow, &st)) {
808 if (mtime.sec)
809 die("shallow file was removed during fetch");
810 } else if (st.st_mtime != mtime.sec
811 #ifdef USE_NSEC
812 - || st.st_mtim.usec != mtime.usec
812 + || st.st_mtim.tv_nsec != mtime.nsec
813 #endif
814 )
815 die("shallow file was changed during fetch");