WebAssembly / WebAssembly/wasi-libc

wasi-libc should probably not define `_POSIX_CPUTIME` and `_POSIX_THREAD_CPUTIME`...

Open
#513 0 comments 0 reactions 1 assignee View on GitHub

@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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.