Enable the DSO workaround on linux only AND in standalone.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user