diff options
author | Tor Lillqvist <tlillqvist@suse.com> | 2011-11-16 17:18:45 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2011-11-17 15:22:53 +0200 |
commit | 9a52bf1d5cfdd01c6d5ce6e41bf1a432f9a29e7f (patch) | |
tree | 0186535887e2aa4473762d58bd76f7fe78920965 /cppunit | |
parent | e75175625e1152651d993fec358599625e704e22 (diff) |
Use lo_dlopen() on Android
Diffstat (limited to 'cppunit')
-rw-r--r-- | cppunit/android.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cppunit/android.patch b/cppunit/android.patch index 7d88a82cfbef..7628f5f9877f 100644 --- a/cppunit/android.patch +++ b/cppunit/android.patch @@ -33,3 +33,21 @@ # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 +--- misc/cppunit-1.12.1/src/cppunit/UnixDynamicLibraryManager.cpp ++++ misc/build/cppunit-1.12.1/src/cppunit/UnixDynamicLibraryManager.cpp +@@ -13,7 +13,15 @@ + DynamicLibraryManager::LibraryHandle + DynamicLibraryManager::doLoadLibrary( const std::string &libraryName ) + { ++#ifdef __ANDROID__ ++ // Use our enhanced dlopen() wrapper, see sal/osl/android/jni/lo-wrapper.c ++ void *(*lo_dlopen)(const char *) = (void *(*)(const char *)) dlsym( RTLD_DEFAULT, "lo_dlopen" ); ++ if (lo_dlopen == NULL) ++ return NULL; ++ return (*lo_dlopen)( libraryName.c_str() ); ++#else + return ::dlopen( libraryName.c_str(), RTLD_NOW | RTLD_GLOBAL ); ++#endif + } + + |