mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
work around dlsym() return value mistyping as suggested in POSIX
This commit is contained in:
parent
b092f2e0f8
commit
e0fd99b911
1 changed files with 4 additions and 2 deletions
|
|
@ -42,7 +42,9 @@ pa_void_func_t pa_load_sym(lt_dlhandle handle, const char *module, const char *s
|
|||
pa_assert(handle);
|
||||
pa_assert(symbol);
|
||||
|
||||
if ((f = ((pa_void_func_t) (size_t) lt_dlsym(handle, symbol))))
|
||||
*(void**) &f = lt_dlsym(handle, symbol);
|
||||
|
||||
if (f)
|
||||
return f;
|
||||
|
||||
if (!module)
|
||||
|
|
@ -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) (size_t) lt_dlsym(handle, sn);
|
||||
*(void**) &f = lt_dlsym(handle, sn);
|
||||
pa_xfree(sn);
|
||||
|
||||
return f;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue