Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merged Bugzilla #354 fix into trunk.
- Loading branch information
Showing
with
2 additions
and
1 deletion.
-
+2
−1
src/loadso/dlopen/SDL_sysloadso.c
|
@@ -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, |
|
|