blob: 59ae4517abf164c53203fd91b28a4cc828f2bf7d [file] [log] [blame]
Markus Mohrhard342211d2012-09-25 19:59:50 +02001--- misc/cppunit-1.13.1/config/ltmain.sh
2+++ misc/build/cppunit-1.13.1/config/ltmain.sh
Tor Lillqvistaafe4bd2011-11-10 00:19:09 +02003@@ -3228,6 +3228,12 @@
4 fi
5 else
6
7+ # Force no versioning suffix for Android thanks to silly
8+ # apkbuilder which doesn't add extra native libs unless their
9+ # name ends with .so
10+
11+ version_type=none
12+
13 # Parse the version information argument.
14 save_ifs="$IFS"; IFS=':'
15 set dummy $vinfo 0 0 0
Markus Mohrhard342211d2012-09-25 19:59:50 +020016--- misc/cppunit-1.13.1/src/cppunit/UnixDynamicLibraryManager.cpp
17+++ misc/build/cppunit-1.13.1/src/cppunit/UnixDynamicLibraryManager.cpp
Tor Lillqvist9a52bf12011-11-16 17:18:45 +020018@@ -13,7 +13,15 @@
19 DynamicLibraryManager::LibraryHandle
20 DynamicLibraryManager::doLoadLibrary( const std::string &libraryName )
21 {
22+#ifdef __ANDROID__
23+ // Use our enhanced dlopen() wrapper, see sal/osl/android/jni/lo-wrapper.c
24+ void *(*lo_dlopen)(const char *) = (void *(*)(const char *)) dlsym( RTLD_DEFAULT, "lo_dlopen" );
25+ if (lo_dlopen == NULL)
26+ return NULL;
27+ return (*lo_dlopen)( libraryName.c_str() );
28+#else
29 return ::dlopen( libraryName.c_str(), RTLD_NOW | RTLD_GLOBAL );
30+#endif
31 }
32
33