mirror of
https://github.com/libretro/scummvm.git
synced 2024-11-30 21:00:39 +00:00
prepend underscore before passing symbols to dlsym, at least on OS X
svn-id: r10328
This commit is contained in:
parent
7d95a33922
commit
bfbc6ed39a
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user