-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use system calls #6708
Comments
I think we don't have the generic |
How would one go around calling something like, say, And I know that using system calls isn't the most portable of assumptions to make, but since I'm already doing a lot of Emscripten-specific stuff in my project I thought I might as well take advantage of the browser-based system calls. |
Not sure there would be much benefit to calling them directly, as opposed to calling musl. Calling musl would also keep working if we change the syscall API, which might happen. But if you want to, I'd look at how musl does it: something like |
In my project, I decided to just go with the wrappers, (i.e. |
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant. |
I am trying to leverage system calls in Emscripten. Here's
syscall.c
, a small test I wrote:And got the following when I compiled with Emscripten:
However, the same program compiles on GCC and Clang.
I know that Emscripten supports system calls (library_syscall.js), but they seem to be hidden from the user, or at least inaccessible.
Are there any flags that enable this or any defines I need to use? I tried adding
#include <emscripten.h>
but that doesn't work either.The text was updated successfully, but these errors were encountered: