Merge commit 'refs/changes/42/2258242/1' of sso://googleplex-android/platform/hardware/libhardware into merge
Test: I solemnly swear I tested this conflict resolution.
Merged-In: I1e1619de7deaa0e6610180e585bd7775887bc562
Change-Id: I55aeadd1baa5ff62c7414b7c768b70addb1d8177
diff --git a/Android.bp b/Android.bp
index f6aacd2..9c5a9cc 100644
--- a/Android.bp
+++ b/Android.bp
@@ -23,6 +23,7 @@
"libcutils",
"liblog",
"libdl",
+ "libvndksupport",
],
cflags: ["-DQEMU_HARDWARE"],
diff --git a/hardware.c b/hardware.c
index 7e4debe..37b61c4 100644
--- a/hardware.c
+++ b/hardware.c
@@ -29,6 +29,8 @@
#define LOG_TAG "HAL"
#include <log/log.h>
+#include <vndksupport/linker.h>
+
/** Base path of the hal modules */
#if defined(__LP64__)
#define HAL_LIBRARY_PATH1 "/system/lib64/hw"
@@ -80,7 +82,7 @@
* dlopen returns. Since RTLD_GLOBAL is not or'd in with
* RTLD_NOW the external symbols will not be global
*/
- handle = dlopen(path, RTLD_NOW);
+ handle = android_load_sphal_library(path, RTLD_NOW);
if (handle == NULL) {
char const *err_str = dlerror();
ALOGE("load: module=%s\n%s", path, err_str?err_str:"unknown");