aboutsummaryrefslogtreecommitdiff
path: root/base/plugins.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'base/plugins.cpp')
-rw-r--r--base/plugins.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/plugins.cpp b/base/plugins.cpp
index 6b70b77393..a8fb07d893 100644
--- a/base/plugins.cpp
+++ b/base/plugins.cpp
@@ -155,6 +155,13 @@ public:
void *DynamicPlugin::findSymbol(const char *symbol) {
#ifdef UNIX
+#ifdef MACOSX
+ // Need to prepend underscore on Mac OS X
+ char buffer[256];
+ buffer[0] = '_';
+ strcpy(buffer + 1, symbol);
+ symbol = buffer;
+#endif
void *func = dlsym(_dlHandle, symbol);
if (!func)
warning("Failed loading symbold '%s' from plugin '%s' (%s)", symbol, _filename.c_str(), dlerror());