WebAssembly / WebAssembly/wasi-libc
wasi-libc should probably not define `_POSIX_CPUTIME` and `_POSIX_THREAD_CPUTIME`...
Open
@abrown is already working on this.
Since Jun 2, 2025.
- Dominant language
- C
- Stars
- 1k
- Forks
- 251
- Avg merge
- 7h 15m
- Merged PRs (30d)
- 3
Description
... since it doesn't have CLOCK_PROCESS_CPUTIME_ID or CLOCK_THREAD_CPUTIME_ID.
I was compiling w2c2 to Wasm and discovered that it does not because of these lines: https://github.com/turbolent/w2c2/blob/22a9adeef081714e0d07ea62aa0ec734c6a5f99f/wasi/wasi.c#L2027-L2038
POSIX seems to pretty clearly indicate that the macros in the title indicate the presence of the clocks above, so wasi-libc should probably not define these macros.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.