Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 8 additions & 40 deletions gix-index/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,14 @@ impl Metadata {
pub fn modified(&self) -> Option<SystemTime> {
#[cfg(not(windows))]
{
#[cfg(not(any(
target_os = "aix",
target_os = "hurd",
all(target_arch = "loongarch64", target_env = "musl")
)))]
#[cfg(not(any(target_os = "aix", target_os = "hurd")))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore loongarch-musl timespec field handling

This revert drops the loongarch64-musl branch from the cfg guard, so that target now compiles against self.0.st_mtime/st_mtime_nsec again; with libc = "0.2.180" still allowed in gix-index/Cargo.toml (line 60), that reintroduces the same build failure fixed in 7e25c34 because stat exposes st_mtim/st_ctim fields there. In practice, any consumer or lockfile still on libc 0.2.180 and building loongarch64-unknown-linux-musl will fail to compile this crate unless they manually bump libc.

Useful? React with 👍 / 👎.

let seconds = self.0.st_mtime;
#[cfg(any(
target_os = "aix",
target_os = "hurd",
all(target_arch = "loongarch64", target_env = "musl")
))]
#[cfg(any(target_os = "aix", target_os = "hurd"))]
let seconds = self.0.st_mtim.tv_sec;

#[cfg(not(any(
target_os = "aix",
target_os = "hurd",
all(target_arch = "loongarch64", target_env = "musl")
)))]
#[cfg(not(any(target_os = "aix", target_os = "hurd")))]
let nanoseconds = self.0.st_mtime_nsec;
#[cfg(any(
target_os = "aix",
target_os = "hurd",
all(target_arch = "loongarch64", target_env = "musl")
))]
#[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
Expand All @@ -97,30 +81,14 @@ impl Metadata {
pub fn created(&self) -> Option<SystemTime> {
#[cfg(not(windows))]
{
#[cfg(not(any(
target_os = "aix",
target_os = "hurd",
all(target_arch = "loongarch64", target_env = "musl")
)))]
#[cfg(not(any(target_os = "aix", target_os = "hurd")))]
let seconds = self.0.st_ctime;
#[cfg(any(
target_os = "aix",
target_os = "hurd",
all(target_arch = "loongarch64", target_env = "musl")
))]
#[cfg(any(target_os = "aix", target_os = "hurd"))]
let seconds = self.0.st_ctim.tv_sec;

#[cfg(not(any(
target_os = "aix",
target_os = "hurd",
all(target_arch = "loongarch64", target_env = "musl")
)))]
#[cfg(not(any(target_os = "aix", target_os = "hurd")))]
let nanoseconds = self.0.st_ctime_nsec;
#[cfg(any(
target_os = "aix",
target_os = "hurd",
all(target_arch = "loongarch64", target_env = "musl")
))]
#[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
Expand Down
Loading