Skip to content

Conversation

@coolreader18
Copy link
Contributor

I think this mostly addresses the issues that were brought up in #1307 regarding clock ids; I made clockid_t a wrapper struct because it needs to be Send and Sync to be used in a constant, and I figured it was opaque in wasi-libc anyway. Instead of static ZSTs, I just made them u8s, since I figured it's very unlikely that wasi-libc would change them from struct __clockid { __wasi_clockid_t id; } to struct __clockid {}, and it'll always be valid to treat a static as a /(u8)+/. One thing I was wondering about, should I add a cfg check to build.rs checking for core::ptr::addr_of? Since I think(?) using that would fix any issue of __clockid becoming a "zst" struct in the future.

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@Amanieu
Copy link
Member

Amanieu commented Nov 4, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Nov 4, 2021

📌 Commit cd57a93 has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Nov 4, 2021

⌛ Testing commit cd57a93 with merge 072d6de...

@bors
Copy link
Contributor

bors commented Nov 4, 2021

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: Amanieu
Pushing 072d6de to master...

@bors bors merged commit 072d6de into rust-lang:master Nov 4, 2021
bors added a commit that referenced this pull request Nov 11, 2021
Scope in Send, Sync for wasi

Without this, libc fails during the build of rustc. See rust-lang/rust#90681
This dependency was introduced in #2499.
Alternative solution: It's not clear this is necessary for core to finish building,
so maybe we should `#[cfg]` it out in that case, instead?
alexcrichton added a commit to alexcrichton/libc that referenced this pull request Dec 10, 2025
These were added way back when in rust-lang#2499 and while they may have existed
in a historical version of wasi-libc they most certainly do not exist in
the current wasi-libc. Any usage of them is already-breaking, so this
deletes these items.
github-merge-queue bot pushed a commit that referenced this pull request Dec 17, 2025
These were added way back when in #2499 and while they may have existed
in a historical version of wasi-libc they most certainly do not exist in
the current wasi-libc. Any usage of them is already-breaking, so this
deletes these items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants