Skip to content

Emscripten: add missing include for getentropy()#1280

Merged
daanx merged 1 commit intomicrosoft:devfrom
kleisauke:dev-emscripten-missing-include
Apr 21, 2026
Merged

Emscripten: add missing include for getentropy()#1280
daanx merged 1 commit intomicrosoft:devfrom
kleisauke:dev-emscripten-missing-include

Conversation

@kleisauke
Copy link
Copy Markdown

This header was previously transitively included to support sleep() in mimalloc/atomic.h, which is no longer present in dev3 (see commit 911443d).

Details
In file included from src/prim/prim.c:22:
src/prim/emscripten/prim.c:199:13: error: call to undeclared function 'getentropy'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  195 |   int err = getentropy(buf, buf_len);
      |             ^
1 error generated.

As noticed in PR emscripten-core/emscripten#26696.

@daanx daanx merged commit f45a090 into microsoft:dev Apr 21, 2026
1 check passed
@kleisauke kleisauke deleted the dev-emscripten-missing-include branch April 21, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants