Commit 054e4c08d2600c61a4805197381b15830f2762bd

Tomás Pollak 2018-01-31T14:28:25

Set ctime/mtime nanosecs to 0 if USE_NSEC is not defined

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/iterator.c b/src/iterator.c
index 36c68a1..ff075ce 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;