Skip to content
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

Provide stubs if dlfcn.h does not exist #302

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TrevorSundberg
Copy link

For compiling under WebAssembly with the wasi-sdk / wasi-libc. Even though the platforms have many POSIX functions implemented, they do not have dlopen etc. This checks if the header exists, and if it does it includes it, otherwise it provides stubs that always return null / errors. If a compiler does not support __has_include, it will just include dlfcn.h as a fallback. Most (if not all) wasm platforms are using at least clang 9, which is when native wasm was added to clang, and they support __has_include.

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.

1 participant