diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-05-08 23:50:26 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-05-08 23:50:26 +0300 |
commit | 1db1773ec27fc4e7c9d44ad02ccfa7eaf364ce07 (patch) | |
tree | c5e99bfe0e69cd37fb8ac70fadf00ce54a1cbe3c /libvo/gl_common.c | |
parent | f2864e9a072f53c38a04dd7c44392521777dc908 (diff) | |
parent | 86c9fb2e8930de031807513c9b93d47394d2d2fa (diff) | |
download | mpv-1db1773ec27fc4e7c9d44ad02ccfa7eaf364ce07.tar.bz2 mpv-1db1773ec27fc4e7c9d44ad02ccfa7eaf364ce07.tar.xz |
Merge svn changes up to r29277
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r-- | libvo/gl_common.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c index b65023f93e..950eb726f0 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -1537,22 +1537,17 @@ void swapGlBuffers(void) { * \brief find address of a linked function * \param s name of function to find * \return address of function or NULL if not found - * - * Copied from xine */ static void *getdladdr(const char *s) { + void *ret = NULL; #ifdef HAVE_LIBDL -#if defined(__sun) || defined(__sgi) - static void *handle = NULL; + void *handle = dlopen(NULL, RTLD_LAZY); if (!handle) - handle = dlopen(NULL, RTLD_LAZY); - return dlsym(handle, s); -#else - return dlsym(0, s); -#endif -#else - return NULL; + return NULL; + ret = dlsym(handle, s); + dlclose(handle); #endif + return ret; } /** |