Skip to content

Conversation

xingxue-ibm
Copy link
Contributor

Description

On AIX, when _ALL_SOURCE is defined, the st_*tim fields in struct stat/struct stat64 use struct st_timespec, whereas under POSIX, they use struct timespec. This patch updates the type to align with the POSIX declaration.

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@xingxue-ibm xingxue-ibm changed the title AIX: Fix the types of 'struct stat'/'stat stat64' fields 'st_*tim' AIX: Fix the types of 'struct stat'/'struct stat64' fields 'st_*tim' Jul 29, 2025
@tgross35
Copy link
Contributor

@xingxue-ibm
Copy link
Contributor Author

Would it make sense to add this as a define at https://github.com/xingxue-ibm/libc/blob/a861a0b0cb16dd0cfcb642c3d294fba754cf6df2/libc-test/build.rs#L5470?

Yeah, I tried that before. Defining _XOPEN_SOURCE excludes quite a few non-POSIX functions.

Copy link
Contributor

@tgross35 tgross35 left a comment

Choose a reason for hiding this comment

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

SGTM then. Wrote up #4598 in case it helps.

Thanks!

@tgross35 tgross35 added this pull request to the merge queue Jul 29, 2025
@xingxue-ibm
Copy link
Contributor Author

SGTM then. Wrote up #4598 in case it helps.

Thanks!

Thank you!

@xingxue-ibm
Copy link
Contributor Author

@rustbot label +stable-nominated

@rustbot rustbot added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jul 29, 2025
Merged via the queue into rust-lang:main with commit cf82fdf Jul 29, 2025
48 of 52 checks passed
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Aug 11, 2025
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Aug 11, 2025
@tgross35 tgross35 mentioned this pull request Aug 11, 2025
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Aug 11, 2025
github-merge-queue bot pushed a commit that referenced this pull request Aug 11, 2025
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-powerpc O-unix stable-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants