From 045c1d602dcba57868845ba3270510593c39480f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 15 May 2008 23:34:41 +0000 Subject: merge glitch-free branch back into trunk git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2445 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/ltdl-helper.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/pulsecore/ltdl-helper.c') 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; -- cgit