Skip to content

Add __errno for newlib targets - #5346

Merged
tgross35 merged 2 commits into
rust-lang:mainfrom
LusterSourav:errno-upstream
Aug 2, 2026
Merged

Add __errno for newlib targets#5346
tgross35 merged 2 commits into
rust-lang:mainfrom
LusterSourav:errno-upstream

Conversation

@LusterSourav

@LusterSourav LusterSourav commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

newlib errno is (*__errno()) so rust needs this to read errno on newlib targets. std already links the symbol

source newlib sys/errno.h
https://github.com/eblot/newlib/blob/master/newlib/libc/include/sys/errno.h

Closes #1995

@LusterSourav

LusterSourav commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jul 31, 2026
@rustbot

rustbot commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Error: Label ready can only be set by Rust team members

Please file an issue on GitHub at triagebot if there's a problem with this bot, or reach out on #triagebot on Zulip.

@LusterSourav

LusterSourav commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

hey @tgross35, the errno pr is up #5346 ci is red but not the pr, the 07/30 nightly cargo changed the build dir layout rust-lang/cargo#15010 and ctest t1 t2 broke, main is red too https://github.com/rust-lang/libc/actions/runs/30618425289 could you look..

@xtqqczze

This comment was marked as outdated.

@LusterSourav

Copy link
Copy Markdown
Contributor Author

@LusterSourav
LusterSourav marked this pull request as ready for review August 2, 2026 18:40
@rustbot

rustbot commented Aug 2, 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 left a comment

Copy link
Copy Markdown
Member

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 Aug 2, 2026
Merged via the queue into rust-lang:main with commit 5c472fb Aug 2, 2026
57 checks passed
@xtqqczze

Copy link
Copy Markdown
Contributor

@tgross35 If you could get this backported and included in a release, that would be great. This is currently blocking the nix port to the Horizon target platform.

@tgross35

Copy link
Copy Markdown
Member

It has the stable-nominated label, it will get picked up. Usually I target a release every ~6-8 weeks.

@tgross35 tgross35 mentioned this pull request Aug 31, 2026
@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 31, 2026
tgross35 pushed a commit to dybucc/libc that referenced this pull request Aug 31, 2026
newlib errno is (*__errno()) so rust needs this to read errno.
std already links it on newlib

source
https://www.sourceware.org/git/?p=newlib-cygwin.git;a=blob;f=newlib/libc/include/sys/errno.h;hb=b6624e23e17bdc505f639d9f181225dbf3a50fc6

(backport <rust-lang#5346>)
(cherry picked from commit 8428e69)
tgross35 pushed a commit to dybucc/libc that referenced this pull request Aug 31, 2026
(backport <rust-lang#5346>)
(cherry picked from commit 5c472fb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-newlib 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.

__errno() not provided with newlib

4 participants