From: Kjetil Barvik <barvik@broadpark.no>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, Kjetil Barvik <barvik@broadpark.no>
Subject: [PATCH/RFC v1 1/2] fix compile error when USE_NSEC is defined
Date: Sun, 15 Feb 2009 20:46:14 +0100 [thread overview]
Message-ID: <43e621190d3e766ea650a4c13e33d6976dde64ad.1234720401.git.barvik@broadpark.no> (raw)
In-Reply-To: <cover.1234720401.git.barvik@broadpark.no>
'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>
---
builtin-fetch-pack.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 67fb80e..3b210c7 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");
--
1.6.1.349.g99fa5
next prev parent reply other threads:[~2009-02-15 19:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-15 19:46 [PATCH/RFC v1 0/2] The ext4 filesystem and racy git Kjetil Barvik
2009-02-15 19:46 ` Kjetil Barvik [this message]
2009-02-15 19:46 ` [PATCH/RFC v1 2/2] make USE_NSEC work as expected Kjetil Barvik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43e621190d3e766ea650a4c13e33d6976dde64ad.1234720401.git.barvik@broadpark.no \
--to=barvik@broadpark.no \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).