diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2011-11-17 15:16:10 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2011-11-17 15:23:04 +0200 |
commit | f95c3e0ee255ecb56879c3c8ae7ba185fae861ab (patch) | |
tree | 87fbd5a3137507b53d39f22a488ee0d639d7ead9 /sal | |
parent | Use lo_dladdr() on Android (diff) | |
download | core-f95c3e0ee255ecb56879c3c8ae7ba185fae861ab.tar.gz core-f95c3e0ee255ecb56879c3c8ae7ba185fae861ab.zip |
Look for lo_main() and not main() on Android
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/process_impl.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index 003e136268e3..b795bbc4d40d 100644 --- a/sal/osl/unx/process_impl.cxx +++ b/sal/osl/unx/process_impl.cxx @@ -130,8 +130,16 @@ oslProcessError SAL_CALL osl_bootstrap_getExecutableFile_Impl ( { oslProcessError result = osl_Process_E_NotFound; +#ifdef ANDROID + /* On Android we want the address of the "lo_main()" function, as + * that is what corresponds to "main()" in LibreOffice programs on + * normal desktop OSes. + */ + void * addr = dlsym (RTLD_DEFAULT, "lo_main"); +#else /* Determine address of "main()" function. */ void * addr = dlsym (RTLD_DEFAULT, "main"); +#endif if (addr != 0) { /* Determine module URL. */ |