summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aebb267)
raw | patch | inline | side by side (parent: aebb267)
author | Petr Baudis <pasky@ucw.cz> | |
Wed, 13 Apr 2005 09:38:44 +0000 (02:38 -0700) | ||
committer | Petr Baudis <xpasky@machine> | |
Wed, 13 Apr 2005 09:38:44 +0000 (02:38 -0700) |
It seems like the nsec portability is limited; in particular, older
glibcs (<=2.2.4 at least) don't seem to like it. So access the nsec
fields in struct stat only when -DNSEC.
Signed-off-by: Petr Baudis <pasky@ucw.cz>
glibcs (<=2.2.4 at least) don't seem to like it. So access the nsec
fields in struct stat only when -DNSEC.
Signed-off-by: Petr Baudis <pasky@ucw.cz>
update-cache.c | patch | blob | history |
diff --git a/update-cache.c b/update-cache.c
index 1f87892e3451f335530054145bdf435e64c0be97..6d37c55a26690dfc10cb2e65e7300b84926fc67f 100644 (file)
--- a/update-cache.c
+++ b/update-cache.c
static void fill_stat_cache_info(struct cache_entry *ce, struct stat *st)
{
ce->ctime.sec = st->st_ctime;
+#ifdef NSEC
ce->ctime.nsec = st->st_ctim.tv_nsec;
+#endif
ce->mtime.sec = st->st_mtime;
+#ifdef NSEC
ce->mtime.nsec = st->st_mtim.tv_nsec;
+#endif
ce->st_dev = st->st_dev;
ce->st_ino = st->st_ino;
ce->st_uid = st->st_uid;