Enable the DSO workaround on linux only AND in standalone.
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -65,9 +65,9 @@ endif (NOT WORD_SIZE EQUAL 32)
|
||||
list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
|
||||
|
||||
add_library (llplugin ${llplugin_SOURCE_FILES})
|
||||
if(LINUX)
|
||||
if(LINUX AND STANDALONE)
|
||||
target_link_libraries (llplugin rt dl)
|
||||
endif(LINUX)
|
||||
endif(LINUX AND STANDALONE)
|
||||
|
||||
add_dependencies(llplugin prepare)
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
*
|
||||
* @endcond
|
||||
*/
|
||||
#if LL_LINUX
|
||||
#if LL_LINUX && defined(LL_STANDALONE)
|
||||
#include <dlfcn.h>
|
||||
#include <apr_portable.h>
|
||||
#endif
|
||||
@@ -87,7 +87,7 @@ int LLPluginInstance::load(std::string &plugin_file)
|
||||
{
|
||||
pluginInitFunction init_function = NULL;
|
||||
|
||||
#if LL_LINUX
|
||||
#if LL_LINUX && defined(LL_STANDALONE)
|
||||
void *dso_handle = dlopen(plugin_file.c_str(), RTLD_NOW | RTLD_GLOBAL);
|
||||
int result = (!dso_handle)?APR_EDSOOPEN:apr_os_dso_handle_put(&mDSOHandle,
|
||||
dso_handle, AIAPRRootPool::get()());
|
||||
@@ -101,7 +101,7 @@ int LLPluginInstance::load(std::string &plugin_file)
|
||||
char buf[1024];
|
||||
apr_dso_error(mDSOHandle, buf, sizeof(buf));
|
||||
|
||||
#if LL_LINUX
|
||||
#if LL_LINUX && defined(LL_STANDALONE)
|
||||
LL_WARNS("Plugin") << "plugin load " << plugin_file << " failed with error " << result << " , additional info string: " << buf << LL_ENDL;
|
||||
#else
|
||||
LL_WARNS("Plugin") << "apr_dso_load of " << plugin_file << " failed with error " << result << " , additional info string: " << buf << LL_ENDL;
|
||||
|
||||
@@ -32,8 +32,10 @@
|
||||
|
||||
#if LL_DBUS_ENABLED
|
||||
|
||||
#ifdef LL_STANDALONE
|
||||
#include <dlfcn.h>
|
||||
#include <apr_portable.h>
|
||||
#endif
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
@@ -74,11 +76,17 @@ bool grab_dbus_syms(std::string dbus_dso_name)
|
||||
//attempt to load the shared library
|
||||
apr_pool_create(&sSymDBUSDSOMemoryPool, NULL);
|
||||
|
||||
#ifdef LL_STANDALONE
|
||||
void *dso_handle = dlopen(dbus_dso_name.c_str(), RTLD_NOW | RTLD_GLOBAL);
|
||||
rv = (!dso_handle)?APR_EDSOOPEN:apr_os_dso_handle_put(&sSymDBUSDSOHandle,
|
||||
dso_handle, sSymDBUSDSOMemoryPool);
|
||||
|
||||
if ( APR_SUCCESS == rv )
|
||||
#else
|
||||
if ( APR_SUCCESS == (rv = apr_dso_load(&sSymDBUSDSOHandle,
|
||||
dbus_dso_name.c_str(),
|
||||
sSymDBUSDSOMemoryPool) ))
|
||||
#endif
|
||||
{
|
||||
INFOMSG("Found DSO: %s", dbus_dso_name.c_str());
|
||||
|
||||
|
||||
@@ -52,8 +52,10 @@ extern "C" {
|
||||
|
||||
#include "aiaprpool.h"
|
||||
#include "apr_dso.h"
|
||||
#ifdef LL_STANDALONE
|
||||
#include <dlfcn.h>
|
||||
#include <apr_portable.h>
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
@@ -89,10 +91,16 @@ bool grab_pa_syms(std::string pulse_dso_name)
|
||||
//attempt to load the shared library
|
||||
sSymPADSOMemoryPool.create();
|
||||
|
||||
#ifdef LL_STANDALONE
|
||||
void *dso_handle = dlopen(pulse_dso_name.c_str(), RTLD_NOW | RTLD_GLOBAL);
|
||||
rv = (!dso_handle)?APR_EDSOOPEN:apr_os_dso_handle_put(&sSymPADSOHandle,
|
||||
dso_handle, sSymPADSOMemoryPool());
|
||||
if ( APR_SUCCESS == rv )
|
||||
#else
|
||||
if ( APR_SUCCESS == (rv = apr_dso_load(&sSymPADSOHandle,
|
||||
pulse_dso_name.c_str(),
|
||||
sSymPADSOMemoryPool()) ))
|
||||
#endif
|
||||
{
|
||||
INFOMSG("Found DSO: %s", pulse_dso_name.c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user