Skip to content

[wasm] Port BlocksRuntime for no dlfcn.h platforms #4869

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Sources/BlocksRuntime/runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#if TARGET_OS_WIN32
#include <Windows.h>
#include <Psapi.h>
#else
#elif __has_include(<dlfcn.h>)
#include <dlfcn.h>
#endif
#if __has_include(<os/assumes.h>)
Expand Down Expand Up @@ -268,7 +268,11 @@ void _Block_use_RR( void (*retain)(const void *),
break;
}
#else
# if __has_include(<dlfcn.h>)
_Block_destructInstance = dlsym(RTLD_DEFAULT, "objc_destructInstance");
# else
_Block_destructInstance = _Block_destructInstance_default;
# endif
#endif
}

Expand Down