Skip to content

std: fix platform checks for hermit - #164771

Open
xtqqczze wants to merge 1 commit into
rust-lang:mainfrom
xtqqczze:GH94678
Open

xtqqczze wants to merge 1 commit into
rust-lang:mainfrom
xtqqczze:GH94678

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #138744.

Found this while working on Hermit OS support for Rustix (bytecodealliance/rustix#1672)

$ cargo +nightly check -q -Zbuild-std --target x86_64-unknown-hermit
error[E0425]: cannot find value `IPV6_UNICAST_HOPS` in crate `c`
   --> ~/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/net/connection/socket/mod.rs:534:61
    |
534 |                 setsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_UNICAST_HOPS, limit as c_int)
    |                                                             ^^^^^^^^^^^^^^^^^ not found in `c`
...
error[E0425]: cannot find value `IPV6_MULTICAST_HOPS` in crate `c`
   --> ~/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/net/connection/socket/mod.rs:957:61
    |
957 |                 setsockopt(&self.inner, c::IPPROTO_IPV6, c::IPV6_MULTICAST_HOPS, limit as c_int)
    |                                                             ^^^^^^^^^^^^^^^^^^^ not found in `c`
    |

cc: @Mallets

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 22, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@xtqqczze
xtqqczze marked this pull request as ready for review October 23, 2026 01:17
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 23, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Oct 23, 2026
@rustbot

rustbot commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 37 candidates
  • Random selection from 6 candidates

@xtqqczze
xtqqczze marked this pull request as draft October 23, 2026 01:26
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 23, 2026
@xtqqczze

xtqqczze commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

The same issue also exists for target_os = "solid_asp3" e.g. aarch64-kmc-solid_asp3.

@xtqqczze xtqqczze changed the title std: fix for hermit targets std: fix platform checks for hermit and solid_asp3 Oct 23, 2026
@xtqqczze xtqqczze changed the title std: fix platform checks for hermit and solid_asp3 std: fix platform checks for hermit Oct 23, 2026
@rust-log-analyzer

This comment has been minimized.

@xtqqczze

Copy link
Copy Markdown
Contributor Author

r? jhpratt

@xtqqczze
xtqqczze marked this pull request as ready for review October 23, 2026 09:08
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 23, 2026

This branch has not been deployed

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

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants