src/dynapi/SDL_dynapi.c
changeset 8095 15b248f1e5a0
parent 8094 9efaae827924
child 8100 03946863a1bb
equal deleted inserted replaced
8094:9efaae827924 8095:15b248f1e5a0
   218     if ((lib < 0) || (get_image_symbol(lib, sym, B_SYMBOL_TYPE_TEXT, &retval) != B_NO_ERROR)) {
   218     if ((lib < 0) || (get_image_symbol(lib, sym, B_SYMBOL_TYPE_TEXT, &retval) != B_NO_ERROR)) {
   219         retval = NULL;
   219         retval = NULL;
   220     }
   220     }
   221     return retval;
   221     return retval;
   222 }
   222 }
   223 #elif defined(unix) || defined(__APPLE__)
   223 #elif defined(unix) || defined(__unix__) || defined(__APPLE__)
   224 #include <dlfcn.h>
   224 #include <dlfcn.h>
   225 static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
   225 static SDL_INLINE void *get_sdlapi_entry(const char *fname, const char *sym)
   226 {
   226 {
   227     void *lib = dlopen(fname, RTLD_NOW | RTLD_LOCAL);
   227     void *lib = dlopen(fname, RTLD_NOW | RTLD_LOCAL);
   228     return lib ? dlsym(lib, sym) : NULL;
   228     return lib ? dlsym(lib, sym) : NULL;