Skip to content

Commit 5c2c893

Browse files
fix: Add RTLD_GLOBAL flag to dlopen for libSystem.B.dylib.
1 parent 6e36753 commit 5c2c893

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_ctypes/callproc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ static void *libsystem_b_handle;
15161516
static bool (*_dyld_shared_cache_contains_path)(const char *path);
15171517

15181518
__attribute__((constructor)) void load_dyld_shared_cache_contains_path(void) {
1519-
libsystem_b_handle = dlopen("/usr/lib/libSystem.B.dylib", RTLD_LAZY);
1519+
libsystem_b_handle = dlopen("/usr/lib/libSystem.B.dylib", RTLD_LAZY | RTLD_GLOBAL);
15201520
if (libsystem_b_handle != NULL) {
15211521
_dyld_shared_cache_contains_path = dlsym(libsystem_b_handle, "_dyld_shared_cache_contains_path");
15221522
}

0 commit comments

Comments
 (0)