u-hurd-gix-index
authorVarious <see below>
Wed, 19 Jun 2024 05:49:55 +0000 (07:49 +0200)
committerFabian Grünbichler <debian@fabian.gruenbichler.email>
Thu, 27 Jun 2024 12:30:53 +0000 (14:30 +0200)
commit daf3844c8f5ce6d0812e35677b1a46d568e226db
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
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

vendor/gix-index-0.33.0/src/fs.rs

index a9acb155de269f660c38e1b822b3842a20f1ea05..5fb369f9eef497ebb790f509ef5645568999fe22 100644 (file)
@@ -54,16 +54,16 @@ impl Metadata {
     pub fn modified(&self) -> Option<SystemTime> {
         #[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<SystemTime> {
         #[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