diff options
Diffstat (limited to 'net-p2p/verlihub/files/patch-plugins')
-rw-r--r-- | net-p2p/verlihub/files/patch-plugins | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/net-p2p/verlihub/files/patch-plugins b/net-p2p/verlihub/files/patch-plugins new file mode 100644 index 000000000000..d8a1436dd5c5 --- /dev/null +++ b/net-p2p/verlihub/files/patch-plugins @@ -0,0 +1,45 @@ +diff -ruN src-orig/cpluginloader.cpp src/cpluginloader.cpp +--- src-orig/cpluginloader.cpp Fri Oct 1 15:19:44 2004 ++++ src/cpluginloader.cpp Thu Oct 12 17:16:22 2006 +@@ -40,6 +40,12 @@ + */ + bool nPlugin::cPluginLoader::Open() + { ++ /* ++ * Reset dlerror() since it can contain error from previous ++ * call to dlopen()/dlsym(). ++ */ ++ dlerror(); ++ + mHandle = dlopen(mFileName.c_str(), RTLD_NOW); + if(!mHandle || IsError()) // NOTE hte OR (||) operator evaluates only the first statement if that one is true + { +@@ -99,6 +105,12 @@ + */ + void * nPlugin::cPluginLoader::LoadSym(const char *name) + { ++ /* ++ * Reset dlerror() since it can contain error from previous ++ * call to dlopen()/dlsym(). ++ */ ++ dlerror(); ++ + void *func = dlsym( mHandle, name); + if(IsError()) + { +diff -ruN src-orig/tpluginbase.cpp src/tpluginbase.cpp +--- src-orig/tpluginbase.cpp Fri Oct 1 15:19:44 2004 ++++ src/tpluginbase.cpp Thu Oct 12 17:16:39 2006 +@@ -34,6 +34,12 @@ + */ + bool nPlugin::tPluginBase::Open() + { ++ /* ++ * Reset dlerror() since it can contain error from previous ++ * call to dlopen()/dlsym(). ++ */ ++ dlerror(); ++ + mHandle = dlopen(mFileName.c_str(), RTLD_NOW); + if(!mHandle) + { |