fixed dlopen & co. for hook, ladspa and meter types.

This commit is contained in:
Takashi Iwai 2003-01-20 17:15:54 +00:00
parent a8a71d5781
commit 2dc8cba51c
3 changed files with 10 additions and 10 deletions

View file

@ -517,15 +517,15 @@ static int snd_pcm_hook_add_conf(snd_pcm_t *pcm, snd_config_t *root, snd_config_
install = buf;
snprintf(buf, sizeof(buf), "_snd_pcm_hook_%s_install", str);
}
h = dlopen(lib, RTLD_NOW);
install_func = h ? dlsym(h, install) : NULL;
h = snd_dlopen(lib, RTLD_NOW);
install_func = h ? snd_dlsym(h, install, SND_DLSYM_VERSION(SND_PCM_DLSYM_VERSION)) : NULL;
err = 0;
if (!h) {
SNDERR("Cannot open shared library %s", lib);
err = -ENOENT;
} else if (!install_func) {
SNDERR("symbol %s is not defined inside %s", install, lib);
dlclose(h);
snd_dlclose(h);
err = -ENXIO;
}
_err: