Skip to content

fix(newlib): update stat struct to match official headers - #5061

Merged
tgross35 merged 1 commit into
rust-lang:mainfrom
chengr4:newlib-stat
Jun 19, 2026
Merged

fix(newlib): update stat struct to match official headers#5061
tgross35 merged 1 commit into
rust-lang:mainfrom
chengr4:newlib-stat

Conversation

@chengr4

@chengr4 chengr4 commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Description

This PR fixes #2795

Note: If any platforms that meet the above criteria are added, they would need to create their own definition and use that (maybe a cfg_if!) - by ian-h-chamberlain

ps. thank @zetanumbers for investigating targets' compatibility

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

    - Source: https://sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/sys/stat.h;h=6525272dd40123d6ea4e7355a8e6f3a3f3d0dbb8;hb=HEAD
    - Note: If any platforms that meet the above criteria are added, they would need to create their own definition and use that (maybe a cfg_if!) - by @ian-h-chamberlain

    ps. thank @zetanumbers for checking targets
@rustbot

rustbot commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@tgross35

Copy link
Copy Markdown
Contributor

Note that this should probably harmonize with #5069

@tgross35 tgross35 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's do this, newlib already has its time_t fields sorted out so this shouldn't be too conflict-prone.

I'm not planning to backport since this is user-visible, unless @ivmarkov @MabezDev @SergioGasquez feel differently.

@rustbot label +stable-declined

View changes since this review

@rustbot rustbot added the stable-declined This change is breaking, difficult to backport, low priority, or otherwise not relevant for 0.2 label Jun 19, 2026
@tgross35
tgross35 added this pull request to the merge queue Jun 19, 2026
Merged via the queue into rust-lang:main with commit cd3d900 Jun 19, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stable-declined This change is breaking, difficult to backport, low priority, or otherwise not relevant for 0.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect newlib stat struct definition

3 participants