Enable the DSO workaround on linux only AND in standalone.

This commit is contained in:
Player Dagostino
2011-08-11 02:12:28 +02:00
parent 258fe82db7
commit 4d2447d764
5 changed files with 23 additions and 7 deletions

View File

@@ -28,7 +28,7 @@
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
*/
#if LL_LINUX
#if LL_LINUX && defined(LL_STANDALONE)
#include <dlfcn.h>
#include <apr_portable.h>
#endif
@@ -90,7 +90,7 @@ void LLImageJ2C::openDSO()
j2cimpl_dso_memory_pool.create();
//attempt to load the shared library
#if LL_LINUX
#if LL_LINUX && defined(LL_STANDALONE)
void *dso_handle = dlopen(dso_path.c_str(), RTLD_NOW | RTLD_GLOBAL);
rv = (!dso_handle)?APR_EDSOOPEN:apr_os_dso_handle_put(&j2cimpl_dso_handle,
dso_handle, j2cimpl_dso_memory_pool());