Merged Bugzilla #354 fix into trunk.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 03 Feb 2007 08:18:41 +0000
changeset 2084b656e6f09be3
parent 2083 db8ec0cfe6b8
child 2085 962aa10fa95b
Merged Bugzilla #354 fix into trunk.
src/loadso/dlopen/SDL_sysloadso.c
     1.1 --- a/src/loadso/dlopen/SDL_sysloadso.c	Tue Jan 23 04:50:14 2007 +0000
     1.2 +++ b/src/loadso/dlopen/SDL_sysloadso.c	Sat Feb 03 08:18:41 2007 +0000
     1.3 @@ -47,11 +47,12 @@
     1.4  {
     1.5      void *symbol = dlsym(handle, name);
     1.6      if (symbol == NULL) {
     1.7 +        /* append an underscore for platforms that need that. */
     1.8          size_t len = 1 + SDL_strlen(name) + 1;
     1.9          char *_name = SDL_stack_alloc(char, len);
    1.10          _name[0] = '_';
    1.11          SDL_strlcpy(&_name[1], name, len);
    1.12 -        symbol = dlsym(handle, name);
    1.13 +        symbol = dlsym(handle, _name);
    1.14          SDL_stack_free(_name);
    1.15          if (symbol == NULL) {
    1.16              SDL_SetError("Failed loading %s: %s", name,