Skip to content

wasi-libc should probably not define _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME... #513

Description

@whitequark

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

Activity

  1. self-assigned this
    on Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions