Skip to content

Conversation

@amy-kwan
Copy link

@amy-kwan amy-kwan commented Dec 13, 2025

What does this PR do

On AIX, libc >= 0.2.178 exposes timespec.tv_nsec as 32-bit (c_int) on both
32- and 64-bit systems to match the platform ABI. This PR updates nix to use
the same width.

This change also eliminates the E0308 mismatched-type errors when building nix
and dependents on AIX with libc 0.2.178+, and keeps FFI layout consistent with the
underlying system ABI.

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API


[dependencies]
libc = { version = "=0.2.175", features = ["extra_traits"] }
libc = { version = "=0.2.178", features = ["extra_traits"] }
Copy link
Author

Choose a reason for hiding this comment

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

The change of tv_nsec to 32-bit comes from libc 0.2.178, which we're using on AIX currently. However, I'm uncertain if this update is appropriate at this time for all targets.

Copy link
Member

Choose a reason for hiding this comment

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

It is always fine to bump libc to a newer compatible version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants