diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-05-03 01:30:40 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-05-03 01:30:40 +0000 |
commit | 59a7467a642e78876f937570d381b1ad959bf612 (patch) | |
tree | 879d586f7ab6aba6f6e750960beeb369e9959be8 | |
parent | ff09fa391ae067c3ab0f84e6cb3bc1e88a92ec62 (diff) |
don't require a module name when resolving a dl symbol
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2352 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r-- | src/pulsecore/ltdl-helper.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pulsecore/ltdl-helper.c b/src/pulsecore/ltdl-helper.c index 711396d8..b83897a6 100644 --- a/src/pulsecore/ltdl-helper.c +++ b/src/pulsecore/ltdl-helper.c @@ -42,12 +42,14 @@ pa_void_func_t pa_load_sym(lt_dlhandle handle, const char *module, const char *s pa_void_func_t f; pa_assert(handle); - pa_assert(module); pa_assert(symbol); - if ((f = ((pa_void_func_t) (long) lt_dlsym(handle, symbol)))) + if ((f = ((pa_void_func_t) (size_t) lt_dlsym(handle, symbol)))) return f; + if (!module) + return NULL; + /* As the .la files might have been cleansed from the system, we should * try with the ltdl prefix as well. */ @@ -57,7 +59,7 @@ pa_void_func_t pa_load_sym(lt_dlhandle handle, const char *module, const char *s if (!isalnum(*c)) *c = '_'; - f = (pa_void_func_t) (long) lt_dlsym(handle, sn); + f = (pa_void_func_t) (size_t) lt_dlsym(handle, sn); pa_xfree(sn); return f; |