summaryrefslogtreecommitdiff
path: root/devel/py-pykde4/files/patch-kpythonpluginfactory__kpythonpluginfactory.cpp
blob: d1dddd936268d33eadf67c41b77d18940aaf3e65 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- ./kpythonpluginfactory/kpythonpluginfactory.cpp.orig	2011-05-20 22:33:41.000000000 +0200
+++ ./kpythonpluginfactory/kpythonpluginfactory.cpp	2011-09-01 16:43:57.371033306 +0200
@@ -18,6 +18,8 @@
    Boston, MA 02111-1307, USA.
 */
 
+#include <dlfcn.h>
+
 #include <QtCore/QCoreApplication>
 #include <QFileInfo>
 #include <QDir>
@@ -305,6 +307,8 @@
 // symbols global and available for later loaded libraries/module.
 QLibrary *LoadPythonLibrary()
 {
+    /* Promote this library (and thus libpython) to RTLD_GLOBAL) */
+    dlopen("kpythonpluginfactory.so", RTLD_NOLOAD | RTLD_GLOBAL);
     QLibrary *pythonLib = new QLibrary();
     pythonLib->setLoadHints(QLibrary::ExportExternalSymbolsHint);
     pythonLib->setFileName(LIB_PYTHON);