Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Actually, this is dumb, just simplify this for now.
 (But what if this finds the wrong symbol? We really should make this a
   ./configure test and only do one dlsym or the other depending on the
   platform...)

Reference Bugzilla #354.

--ryan.
  • Loading branch information
icculus committed Feb 3, 2007
1 parent 7e9130d commit b123ea4
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/loadso/dlopen/SDL_sysloadso.c
Expand Up @@ -45,19 +45,13 @@ void *SDL_LoadFunction(void *handle, const char *name)
{
void *symbol = dlsym(handle, name);
if ( symbol == NULL ) {

#ifdef DLOPEN_NEED_UNDERSCORE
/* 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);
SDL_stack_free(_name);
#else
symbol = dlsym(handle, name);
#endif

if ( symbol == NULL ) {
SDL_SetError("Failed loading %s: %s", name, (const char *)dlerror());
}
Expand Down

0 comments on commit b123ea4

Please sign in to comment.