From: Various Date: Wed, 19 Jun 2024 05:49:55 +0000 (+0200) Subject: u-hurd-gix-index X-Git-Tag: archive/raspbian/1.79.0+dfsg1-2+rpi1^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=598cfeb32755da13001b5fa2dccf862f6491fe26;p=rustc.git u-hurd-gix-index commit daf3844c8f5ce6d0812e35677b1a46d568e226db Author: Samuel Thibault Date: Sun May 26 21:13:40 2024 +0200 hurd: fix accessing st_[mc]time GNU/Hurd uses a st_[mc]tim timespec, like aix Gbp-Pq: Topic vendor Gbp-Pq: Name u-hurd-gix-index.patch --- diff --git a/vendor/gix-index-0.33.0/src/fs.rs b/vendor/gix-index-0.33.0/src/fs.rs index a9acb155de..5fb369f9ee 100644 --- a/vendor/gix-index-0.33.0/src/fs.rs +++ b/vendor/gix-index-0.33.0/src/fs.rs @@ -54,16 +54,16 @@ impl Metadata { pub fn modified(&self) -> Option { #[cfg(not(windows))] { - #[cfg(not(target_os = "aix"))] + #[cfg(not(any(target_os = "aix", target_os = "hurd")))] let seconds = self.0.st_mtime; - #[cfg(target_os = "aix")] + #[cfg(any(target_os = "aix", target_os = "hurd"))] let seconds = self.0.st_mtim.tv_sec; - #[cfg(not(any(target_os = "netbsd", target_os = "aix")))] + #[cfg(not(any(target_os = "netbsd", target_os = "aix", target_os = "hurd")))] let nanoseconds = self.0.st_mtime_nsec; #[cfg(target_os = "netbsd")] let nanoseconds = self.0.st_mtimensec; - #[cfg(target_os = "aix")] + #[cfg(any(target_os = "aix", target_os = "hurd"))] let nanoseconds = self.0.st_mtim.tv_nsec; // All operating systems treat the seconds as offset from unix epoch, hence it must @@ -83,16 +83,16 @@ impl Metadata { pub fn created(&self) -> Option { #[cfg(not(windows))] { - #[cfg(not(target_os = "aix"))] + #[cfg(not(any(target_os = "aix", target_os = "hurd")))] let seconds = self.0.st_ctime; - #[cfg(target_os = "aix")] + #[cfg(any(target_os = "aix", target_os = "hurd"))] let seconds = self.0.st_ctim.tv_sec; - #[cfg(not(any(target_os = "netbsd", target_os = "aix")))] + #[cfg(not(any(target_os = "netbsd", target_os = "aix", target_os = "hurd")))] let nanoseconds = self.0.st_ctime_nsec; #[cfg(target_os = "netbsd")] let nanoseconds = self.0.st_ctimensec; - #[cfg(target_os = "aix")] + #[cfg(any(target_os = "aix", target_os = "hurd"))] let nanoseconds = self.0.st_ctim.tv_nsec; // All operating systems treat the seconds as offset from unix epoch, hence it must