]> git.proxmox.com Git - libgit2.git/commitdiff
merge::workdir::dirty: update to use `st_ctime_nsec`
authorEdward Thomson <ethomson@github.com>
Mon, 7 Mar 2016 14:37:51 +0000 (09:37 -0500)
committerEdward Thomson <ethomson@github.com>
Mon, 7 Mar 2016 14:37:51 +0000 (09:37 -0500)
Update unit test to use newfangled `st_ctime_nsec`, which provides
indirection to the platform-correct name.

tests/merge/workdir/dirty.c

index 99e33e0cde75b93994595618b15c3af26185f475..a69919f536a353d08eb6cfa43df88887a0f18cd5 100644 (file)
@@ -165,8 +165,8 @@ static void hack_index(char *files[])
                entry->ctime.seconds = (int32_t)statbuf.st_ctime;
                entry->mtime.seconds = (int32_t)statbuf.st_mtime;
 #if defined(GIT_USE_NSEC)
-               entry->ctime.nanoseconds = statbuf.st_ctim.tv_nsec;
-               entry->mtime.nanoseconds = statbuf.st_mtim.tv_nsec;
+               entry->ctime.nanoseconds = statbuf.st_ctime_nsec;
+               entry->mtime.nanoseconds = statbuf.st_mtime_nsec;
 #else
                entry->ctime.nanoseconds = 0;
                entry->mtime.nanoseconds = 0;