summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2011-11-17 15:15:14 +0200
committerTor Lillqvist <tlillqvist@suse.com>2011-11-17 15:23:03 +0200
commit21c0c69ddf128f748bd2c294cb1a348a797bb70f (patch)
tree3222651b03337d1b6b47ad54b11b41b609ab0a3c /sal
parent232ad7dac680a654217ff38bea86791bba250ee4 (diff)
Use lo_dladdr() on Android
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/module.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sal/osl/unx/module.c b/sal/osl/unx/module.c
index 824a62936c07..b79dfbc80ceb 100644
--- a/sal/osl/unx/module.c
+++ b/sal/osl/unx/module.c
@@ -95,9 +95,19 @@ static sal_Bool getModulePathFromAddress(void * address, rtl_String ** path) {
#else
Dl_info dl_info;
- if ((result = dladdr(address, &dl_info)) != 0)
+#ifdef ANDROID
+ int (*lo_dladdr)(void *, Dl_info *) = dlsym(RTLD_DEFAULT, "lo_dladdr");
+ result = (*lo_dladdr)(address, &dl_info);
+#else
+ result = dladdr(address, &dl_info)
+#endif
+
+ if (result != 0)
{
rtl_string_newFromStr(path, dl_info.dli_fname);
+#ifdef ANDROID
+ free((void *) dl_info.dli_fname);
+#endif
result = sal_True;
}
else