mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
Added symbol versioning for dlsym-callbacks.
Removed snd_config_refer_load from confmisc.c and pcm.c.
This commit is contained in:
parent
36a2810081
commit
b45c08611c
43 changed files with 184 additions and 137 deletions
|
|
@ -502,10 +502,14 @@ static int snd_ctl_open_conf(snd_ctl_t **ctlp, const char *name,
|
|||
open_name = buf;
|
||||
snprintf(buf, sizeof(buf), "_snd_ctl_%s_open", str);
|
||||
}
|
||||
if (!lib)
|
||||
lib = ALSA_LIB;
|
||||
h = dlopen(lib, RTLD_NOW);
|
||||
open_func = h ? dlsym(h, open_name) : NULL;
|
||||
if (h) {
|
||||
if ((err = snd_dlsym_verify(h, open_name, SND_DLSYM_VERSION(SND_CONTROL_DLSYM_VERSION))) < 0) {
|
||||
dlclose(h);
|
||||
goto _err;
|
||||
}
|
||||
open_func = dlsym(h, open_name);
|
||||
}
|
||||
err = 0;
|
||||
if (!h) {
|
||||
SNDERR("Cannot open shared library %s", lib);
|
||||
|
|
|
|||
|
|
@ -318,6 +318,7 @@ int snd_ctl_hw_open(snd_ctl_t **handle, const char *name, int card, int mode)
|
|||
return 0;
|
||||
}
|
||||
|
||||
SND_DLSYM_BUILD_VERSION(_snd_ctl_hw_open, SND_CONTROL_DLSYM_VERSION);
|
||||
int _snd_ctl_hw_open(snd_ctl_t **handlep, char *name, snd_config_t *root ATTRIBUTE_UNUSED, snd_config_t *conf)
|
||||
{
|
||||
snd_config_iterator_t i, next;
|
||||
|
|
|
|||
|
|
@ -525,6 +525,7 @@ int snd_ctl_shm_open(snd_ctl_t **handlep, const char *name, const char *sockname
|
|||
return result;
|
||||
}
|
||||
|
||||
SND_DLSYM_BUILD_VERSION(_snd_ctl_shm_open, SND_CONTROL_DLSYM_VERSION);
|
||||
int _snd_ctl_shm_open(snd_ctl_t **handlep, char *name, snd_config_t *root, snd_config_t *conf, int mode)
|
||||
{
|
||||
snd_config_iterator_t i, next;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue