diff --git a/gix-index/src/fs.rs b/gix-index/src/fs.rs index 2be45bb8d7a..f2ca1ad9124 100644 --- a/gix-index/src/fs.rs +++ b/gix-index/src/fs.rs @@ -54,14 +54,30 @@ impl Metadata { pub fn modified(&self) -> Option { #[cfg(not(windows))] { - #[cfg(not(any(target_os = "aix", target_os = "hurd")))] + #[cfg(not(any( + target_os = "aix", + target_os = "hurd", + all(target_arch = "loongarch64", target_env = "musl") + )))] let seconds = self.0.st_mtime; - #[cfg(any(target_os = "aix", target_os = "hurd"))] + #[cfg(any( + target_os = "aix", + target_os = "hurd", + all(target_arch = "loongarch64", target_env = "musl") + ))] let seconds = self.0.st_mtim.tv_sec; - #[cfg(not(any(target_os = "aix", target_os = "hurd")))] + #[cfg(not(any( + target_os = "aix", + target_os = "hurd", + all(target_arch = "loongarch64", target_env = "musl") + )))] let nanoseconds = self.0.st_mtime_nsec; - #[cfg(any(target_os = "aix", target_os = "hurd"))] + #[cfg(any( + target_os = "aix", + target_os = "hurd", + all(target_arch = "loongarch64", target_env = "musl") + ))] let nanoseconds = self.0.st_mtim.tv_nsec; // All operating systems treat the seconds as offset from unix epoch, hence it must @@ -81,14 +97,30 @@ impl Metadata { pub fn created(&self) -> Option { #[cfg(not(windows))] { - #[cfg(not(any(target_os = "aix", target_os = "hurd")))] + #[cfg(not(any( + target_os = "aix", + target_os = "hurd", + all(target_arch = "loongarch64", target_env = "musl") + )))] let seconds = self.0.st_ctime; - #[cfg(any(target_os = "aix", target_os = "hurd"))] + #[cfg(any( + target_os = "aix", + target_os = "hurd", + all(target_arch = "loongarch64", target_env = "musl") + ))] let seconds = self.0.st_ctim.tv_sec; - #[cfg(not(any(target_os = "aix", target_os = "hurd")))] + #[cfg(not(any( + target_os = "aix", + target_os = "hurd", + all(target_arch = "loongarch64", target_env = "musl") + )))] let nanoseconds = self.0.st_ctime_nsec; - #[cfg(any(target_os = "aix", target_os = "hurd"))] + #[cfg(any( + target_os = "aix", + target_os = "hurd", + all(target_arch = "loongarch64", target_env = "musl") + ))] let nanoseconds = self.0.st_ctim.tv_nsec; // All operating systems treat the seconds as offset from unix epoch, hence it must