Commit d624b408 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Merged Bugzilla #354 fix into trunk.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402256
parent 80ae5447
......@@ -47,11 +47,12 @@ SDL_LoadFunction(void *handle, const char *name)
{
void *symbol = dlsym(handle, name);
if (symbol == NULL) {
/* append an underscore for platforms that need that. */
size_t len = 1 + SDL_strlen(name) + 1;
char *_name = SDL_stack_alloc(char, len);
_name[0] = '_';
SDL_strlcpy(&_name[1], name, len);
symbol = dlsym(handle, name);
symbol = dlsym(handle, _name);
SDL_stack_free(_name);
if (symbol == NULL) {
SDL_SetError("Failed loading %s: %s", name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment