Skip to content

Commit

Permalink
fix: NetBSD doesn't have st_mtime_nsec
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Dec 10, 2023
1 parent 58ed530 commit ef292b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gix-index/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ impl Metadata {
{
Some(system_time_from_secs_nanos(
self.0.st_mtime.try_into().ok()?,
#[cfg(not(target_os = "netbsd"))]
self.0.st_mtime_nsec.try_into().ok()?,
#[cfg(target_os = "netbsd")]
self.0.st_mtimensec.try_into().ok()?,
))
}
#[cfg(windows)]
Expand Down

0 comments on commit ef292b1

Please sign in to comment.