diff --git a/quickjs-libc.c b/quickjs-libc.c index 85e2448..f66f872 100644 --- a/quickjs-libc.c +++ b/quickjs-libc.c @@ -517,7 +517,7 @@ static JSModuleDef *js_module_loader_so(JSContext *ctx, goto fail; } - init = (JSInitModuleFunc *)dlsym(hd, "js_init_module"); + *(void **) (&init) = dlsym(hd, "js_init_module"); if (!init) { JS_ThrowReferenceError(ctx, "could not load module filename '%s': js_init_module not found", module_name);