| Markus Mohrhard | 342211d | 2012-09-25 19:59:50 +0200 | [diff] [blame] | 1 | --- misc/cppunit-1.13.1/config/ltmain.sh |
| 2 | +++ misc/build/cppunit-1.13.1/config/ltmain.sh |
| Tor Lillqvist | aafe4bd | 2011-11-10 00:19:09 +0200 | [diff] [blame] | 3 | @@ -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 Mohrhard | 342211d | 2012-09-25 19:59:50 +0200 | [diff] [blame] | 16 | --- misc/cppunit-1.13.1/src/cppunit/UnixDynamicLibraryManager.cpp |
| 17 | +++ misc/build/cppunit-1.13.1/src/cppunit/UnixDynamicLibraryManager.cpp |
| Tor Lillqvist | 9a52bf1 | 2011-11-16 17:18:45 +0200 | [diff] [blame] | 18 | @@ -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 | |