Fix cpp style cast and variable name am: 6a70875ba8
am: 59c43578c6
Change-Id: Iff97f1c0b3c2e42bbf8a0344c68c98e2bc38daf7
This commit is contained in:
commit
bf5f2a9f81
1 changed files with 5 additions and 5 deletions
|
@ -44,14 +44,14 @@ dispatchTable loadHAL() {
|
|||
const char* filename = "libRS_internal.so";
|
||||
// Try to load libRS_internal.so from the "rs" namespace directly.
|
||||
typedef struct android_namespace_t* (*GetExportedNamespaceFnPtr)(const char*);
|
||||
GetExportedNamespaceFnPtr getExportedNamespace =
|
||||
(GetExportedNamespaceFnPtr)dlsym(RTLD_DEFAULT, "android_get_exported_namespace");
|
||||
GetExportedNamespaceFnPtr getExportedNamespace = reinterpret_cast<GetExportedNamespaceFnPtr>(
|
||||
dlsym(RTLD_DEFAULT, "android_get_exported_namespace"));
|
||||
void* handle = nullptr;
|
||||
if (getExportedNamespace != nullptr) {
|
||||
android_namespace_t* rs_namespace = getExportedNamespace("rs");
|
||||
if (rs_namespace != nullptr) {
|
||||
android_namespace_t* rsNamespace = getExportedNamespace("rs");
|
||||
if (rsNamespace != nullptr) {
|
||||
const android_dlextinfo dlextinfo = {
|
||||
.flags = ANDROID_DLEXT_USE_NAMESPACE, .library_namespace = rs_namespace,
|
||||
.flags = ANDROID_DLEXT_USE_NAMESPACE, .library_namespace = rsNamespace,
|
||||
};
|
||||
handle = android_dlopen_ext(filename, RTLD_LAZY | RTLD_LOCAL, &dlextinfo);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue