Skip to content

Re-add stat definition for Vita and 3DS (to fix compilation on main)#5322

Merged
tgross35 merged 1 commit into
rust-lang:mainfrom
vita-rust:re-add-stat-definition-vita-3ds
Jul 24, 2026
Merged

Re-add stat definition for Vita and 3DS (to fix compilation on main)#5322
tgross35 merged 1 commit into
rust-lang:mainfrom
vita-rust:re-add-stat-definition-vita-3ds

Conversation

@pheki

@pheki pheki commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Description

Re-add stat definition for Vita and 3DS to fix compilation on main

This comment made me realize that these targets are failing on main (and I'm one of the target maintainers for armv7-sony-vita-newlibeabihf).

It seems that both were broken by #5061 becasuse of a missing re-export, but at the same time it made me realize that the new definition seems incorrect for the Vita.

VitaSDK uses its own newlib fork, with its stat defined in https://github.com/vitasdk/newlib/blob/fbb8375870d799758e0b4358d2f1708781aa26a6/newlib/libc/sys/vita/sys/stat.h#L27-L55

For horizon, that definition is the same as the old one (and libc-0.2 one), and the discussion in #2795 implies it's correct, but I'm not sure where can we find the canonical headers for it.

Checklist

  • Relevant tests in libc-test/semver have been updated
  • Commit messages permalink to headers for added or changed API
  • Placeholder or unstable values like *LAST or *MAX have the standard
    doc comment
  • Tested locally (cargo test -p libc-test --target mytarget);
    especially relevant for platforms that may not be checked in CI

Checked locally using both ./etc/libc-util.py check-all-targets --only {target} libc and cargo +nightly check --target {target} -Z build-std=core for:

  • armv7-sony-vita-newlibeabihf
  • armv6k-nintendo-3ds

And TYSM for maintaining libc!

@pheki
pheki force-pushed the re-add-stat-definition-vita-3ds branch from e739c75 to e60b389 Compare July 23, 2026 23:51
@rustbot

rustbot commented Jul 23, 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 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jul 24, 2026

@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.

@tgross35
tgross35 added this pull request to the merge queue Jul 24, 2026
Merged via the queue into rust-lang:main with commit 081721d Jul 24, 2026
57 checks passed
@pheki
pheki deleted the re-add-stat-definition-vita-3ds branch July 26, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-newlib O-unix stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants