changeset 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 db8ec0cfe6b8
children 962aa10fa95b
files src/loadso/dlopen/SDL_sysloadso.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
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,