提交 8cd6192e 编写于 作者: K Kjetil Barvik 提交者: Junio C Hamano

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: NKjetil Barvik <barvik@broadpark.no>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 36419c8e
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册