summaryrefslogtreecommitdiffstats
path: root/linux/LibSensors.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-12-12 20:08:17 +0100
committerDaniel Lange <DLange@git.local>2020-12-12 20:08:17 +0100
commit12421f460a798d34a1e6277a1c37cce78fa4956b (patch)
tree1acad0e608c89a68ee283dc7b629797165febf7e /linux/LibSensors.c
parent738d31b9038a94b712e0a3cd10ff02d3d27c967c (diff)
Fix dlopen issue for libsensors5 in Debian Buster, Bullseye
libsensors.so is provided only by the -dev package, so search for libsensors.so.5 (installed from the libsensors5 package) explicitly see: dpkg-query -S libsensors.so
Diffstat (limited to 'linux/LibSensors.c')
-rw-r--r--linux/LibSensors.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/linux/LibSensors.c b/linux/LibSensors.c
index a30e21b6..d006874f 100644
--- a/linux/LibSensors.c
+++ b/linux/LibSensors.c
@@ -21,9 +21,13 @@ static void* dlopenHandle = NULL;
int LibSensors_init(FILE* input) {
if (!dlopenHandle) {
- dlopenHandle = dlopen("libsensors.so", RTLD_LAZY);
- if (!dlopenHandle)
- goto dlfailure;
+ dlopenHandle = dlopen("libsensors.so.", RTLD_LAZY);
+ if (!dlopenHandle) {
+ /* Debian contains no unversioned .so in libsensors5, only in the -dev package, so work around that: */
+ dlopenHandle = dlopen("libsensors.so.5", RTLD_LAZY);
+ if (!dlopenHandle)
+ goto dlfailure;
+ }
/* Clear any errors */
dlerror();

© 2014-2024 Faster IT GmbH | imprint | privacy policy