I did the following:
$ git clone https://github.com/libgit2/libgit2.git && cd libgit2
$ mkdir build && cd build && cmake .. -DUSE_NSEC=OFF && make -j
Compilation fails due to some test files, which require nanosecond-specific fields, e.g.:
/libgit2/tests/libgit2/index/nsec.c: In function ‘try_create_file_with_nsec_timestamp’:
/libgit2/tests/libgit2/index/nsec.c:38:23: error: ‘struct stat’ has no member named ‘st_ctime_nsec’
38 | if (st.st_ctime_nsec && st.st_mtime_nsec)
| ^
/libgit2/tests/libgit2/index/nsec.c:38:43: error: ‘struct stat’ has no member named ‘st_mtime_nsec’
38 | if (st.st_ctime_nsec && st.st_mtime_nsec)
| ^
I can add -DBUILD_TESTS=OFF to also disable tests and the build succeeds. But if I could have some tests be built, that'd be nice.
Anyway, this is a minor issue and there is a workaround, so please feel free to close it if you wish.
I did the following:
Compilation fails due to some test files, which require nanosecond-specific fields, e.g.:
I can add
-DBUILD_TESTS=OFFto also disable tests and the build succeeds. But if I could have some tests be built, that'd be nice.Anyway, this is a minor issue and there is a workaround, so please feel free to close it if you wish.