Merged Bugzilla #354 fix into trunk.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 03 Feb 2007 08:18:41 +0000
changeset 2084 b656e6f09be3
parent 2083 db8ec0cfe6b8
child 2085 962aa10fa95b
Merged Bugzilla #354 fix into trunk.
src/loadso/dlopen/SDL_sysloadso.c
--- 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,