Mercurial > sdl-ios-xcode
diff src/loadso/dlopen/SDL_sysloadso.c @ 2084:b656e6f09be3
Merged Bugzilla #354 fix into trunk.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sat, 03 Feb 2007 08:18:41 +0000 |
parents | c121d94672cb |
children | 3e42ad69f4a3 |
line wrap: on
line diff
--- a/src/loadso/dlopen/SDL_sysloadso.c Tue Jan 23 04:50:14 2007 +0000 +++ b/src/loadso/dlopen/SDL_sysloadso.c Sat Feb 03 08:18:41 2007 +0000 @@ -47,11 +47,12 @@ { 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,