mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Added a lookup for exact ALSA library binary to allow RTLD_LOCAL usage
This commit is contained in:
parent
b9343e0834
commit
4dbdc06809
1 changed files with 7 additions and 0 deletions
|
|
@ -27,6 +27,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <dlfcn.h>
|
||||
#include "local.h"
|
||||
|
||||
|
|
@ -50,6 +51,12 @@ void *snd_dlopen(const char *name, int mode)
|
|||
#ifndef PIC
|
||||
if (name == NULL)
|
||||
return &snd_dlsym_start;
|
||||
#else
|
||||
if (name == NULL) {
|
||||
Dl_info dlinfo;
|
||||
if (dladdr(snd_dlopen, &dlinfo) > 0)
|
||||
name = dlinfo.dli_fname;
|
||||
}
|
||||
#endif
|
||||
return dlopen(name, mode);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue