summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Pollak <tomaspollak@gmail.com>2018-01-31 14:28:25 -0300
committerGitHub <noreply@github.com>2018-01-31 14:28:25 -0300
commit054e4c08d2600c61a4805197381b15830f2762bd (patch)
treea6e795b194f6cec45c0498297e5148ba4ac871fc
parent752006dd9a617466adc50fca1587e5e6325954fd (diff)
downloadlibgit2-054e4c08d2600c61a4805197381b15830f2762bd.tar.gz
Set ctime/mtime nanosecs to 0 if USE_NSEC is not defined
-rw-r--r--src/iterator.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/iterator.c b/src/iterator.c
index 36c68a152..ff075ce8c 100644
--- a/src/iterator.c
+++ b/src/iterator.c
@@ -1463,6 +1463,9 @@ static void filesystem_iterator_set_current(
#if defined(GIT_USE_NSEC)
iter->entry.ctime.nanoseconds = entry->st.st_ctime_nsec;
iter->entry.mtime.nanoseconds = entry->st.st_mtime_nsec;
+#else
+ iter->entry.ctime.nanoseconds = 0;
+ iter->entry.mtime.nanoseconds = 0;
#endif
iter->entry.dev = entry->st.st_dev;