fix: Unix build issues with dladdr
This commit is contained in:
parent
fdf01dfb50
commit
3798654f92
@ -795,8 +795,8 @@ namespace hex {
|
|||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#elif !defined(OS_WEB)
|
#elif !defined(OS_WEB)
|
||||||
Dl_info info;
|
Dl_info info = {};
|
||||||
if (dladdr(symbol, nullptr) == 0)
|
if (dladdr(symbol, &info) == 0)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
return dlopen(info.dli_fname, RTLD_LAZY);
|
return dlopen(info.dli_fname, RTLD_LAZY);
|
||||||
|
@ -77,8 +77,7 @@ namespace hex::script::loader {
|
|||||||
if (library == "cimgui") {
|
if (library == "cimgui") {
|
||||||
return getExport<void*>(ImHexApi::System::getLibImHexModuleHandle(), symbolName);
|
return getExport<void*>(ImHexApi::System::getLibImHexModuleHandle(), symbolName);
|
||||||
} else if (library == "ImHex") {
|
} else if (library == "ImHex") {
|
||||||
auto address = getExport<void*>(hex::getContainingModule((void*)&pInvokeOverride), symbolName);
|
return getExport<void*>(hex::getContainingModule((void*)&pInvokeOverride), symbolName);
|
||||||
return address;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user