summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/ltdl-helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/ltdl-helper.c')
-rw-r--r--src/pulsecore/ltdl-helper.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pulsecore/ltdl-helper.c b/src/pulsecore/ltdl-helper.c
index 711396d8..0d4c22f8 100644
--- a/src/pulsecore/ltdl-helper.c
+++ b/src/pulsecore/ltdl-helper.c
@@ -1,5 +1,3 @@
-/* $Id$ */
-
/***
This file is part of PulseAudio.
@@ -42,12 +40,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 +57,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;