Added symbol versioning for dlsym-callbacks.

Removed snd_config_refer_load from confmisc.c and pcm.c.
This commit is contained in:
Jaroslav Kysela 2001-08-15 12:12:16 +00:00
parent 36a2810081
commit b45c08611c
43 changed files with 184 additions and 137 deletions

View file

@ -101,10 +101,14 @@ static int snd_timer_open_conf(snd_timer_t **timer,
open_name = buf;
snprintf(buf, sizeof(buf), "_snd_timer_%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_TIMER_DLSYM_VERSION))) < 0) {
dlclose(h);
goto _err;
}
open_func = dlsym(h, open_name);
}
if (!h) {
SNDERR("Cannot open shared library %s", lib);
err = -ENOENT;