diff options
author | Jan Beich <[email protected]> | 2019-09-13 02:21:13 +0000 |
---|---|---|
committer | Matthew Gregan <[email protected]> | 2019-09-16 20:12:09 +1200 |
commit | 9eb4c89535fdf3726900231a804aa35e19b9f93c (patch) | |
tree | c57a644c398e7e9629e9271a645763147b01145e /src/cubeb_alsa.c | |
parent | 797779866bee11adb1a0dc323159be2fabe5584e (diff) | |
download | cubeb-9eb4c89535fdf3726900231a804aa35e19b9f93c.tar.gz cubeb-9eb4c89535fdf3726900231a804aa35e19b9f93c.zip |
Consistently try loading versioned library first
On Linux dependending on distribution `.so` symlink maybe missing.
On OpenBSD `.so.X` symlink is missing unlike `.so` while `.so.X.Y`
often changes downstream.
Diffstat (limited to 'src/cubeb_alsa.c')
-rw-r--r-- | src/cubeb_alsa.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cubeb_alsa.c b/src/cubeb_alsa.c index b2e4dd4..a564fbf 100644 --- a/src/cubeb_alsa.c +++ b/src/cubeb_alsa.c @@ -811,9 +811,12 @@ alsa_init(cubeb ** context, char const * context_name) *context = NULL; #ifndef DISABLE_LIBASOUND_DLOPEN - libasound = dlopen("libasound.so", RTLD_LAZY); + libasound = dlopen("libasound.so.2", RTLD_LAZY); if (!libasound) { - return CUBEB_ERROR; + libasound = dlopen("libasound.so", RTLD_LAZY); + if (!libasound) { + return CUBEB_ERROR; + } } #define LOAD(x) { \ |