diff options
author | Axel Rasmussen <axelrasmussen@google.com> | 2015-06-15 09:28:55 -0600 |
---|---|---|
committer | Axel Rasmussen <axelrasmussen@google.com> | 2015-09-18 23:33:56 -0700 |
commit | e9e6df2c8f4a8577fcbcfdf56bf255ef9774b6ec (patch) | |
tree | 1b3737835e6e274be11db210a18974f2c40bff74 /tests/merge | |
parent | 2be7855727acf829de989f92a8f97a31ec3a378a (diff) | |
download | libgit2-e9e6df2c8f4a8577fcbcfdf56bf255ef9774b6ec.tar.gz |
cmake: Only provide USE_NSEC if struct stat members are avilable.
This allows us to remove OS checks from source code, instead relying
on CMake to detect whether or not `struct stat` has the nanoseconds
members we rely on.
Diffstat (limited to 'tests/merge')
-rw-r--r-- | tests/merge/workdir/dirty.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/merge/workdir/dirty.c b/tests/merge/workdir/dirty.c index ed402bd14..f168963b2 100644 --- a/tests/merge/workdir/dirty.c +++ b/tests/merge/workdir/dirty.c @@ -164,8 +164,7 @@ static void hack_index(char *files[]) entry->ctime.seconds = (git_time_t)statbuf.st_ctime; entry->mtime.seconds = (git_time_t)statbuf.st_mtime; -#if !defined(GIT_WIN32) && !defined(__APPLE__) - /* Apple and Windows doesn't provide these struct stat fields. */ +#if defined(GIT_USE_NSEC) entry->ctime.nanoseconds = statbuf.st_ctim.tv_nsec; entry->mtime.nanoseconds = statbuf.st_mtim.tv_nsec; #else |