Fix a problem not letting plugins work when the client is built on RedHat and derived systems (Fedora is affected too). Completely avoid apr_dso_load() on Linux (they modified it to open libraries with RTLD_NOW | RTLD_GLOBAL | RTLD_DEEPBIND). Get a standard DSO handle with RTLD_NOW | RTLD_GLOBAL flags instead, and convert it to a valid APR one by using apr_os_handle_put().
This commit is contained in:
@@ -32,6 +32,9 @@
|
||||
|
||||
#if LL_DBUS_ENABLED
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <apr_portable.h>
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
extern "C" {
|
||||
@@ -71,9 +74,11 @@ bool grab_dbus_syms(std::string dbus_dso_name)
|
||||
//attempt to load the shared library
|
||||
apr_pool_create(&sSymDBUSDSOMemoryPool, NULL);
|
||||
|
||||
if ( APR_SUCCESS == (rv = apr_dso_load(&sSymDBUSDSOHandle,
|
||||
dbus_dso_name.c_str(),
|
||||
sSymDBUSDSOMemoryPool) ))
|
||||
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 )
|
||||
{
|
||||
INFOMSG("Found DSO: %s", dbus_dso_name.c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user