diff options
author | Daniel Lange <DLange@git.local> | 2020-12-13 20:09:06 +0100 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-12-13 20:09:06 +0100 |
commit | f8a610e6e170555f78731c3ea976d833a9f9f716 (patch) | |
tree | ffa26fe1d44350f8b5d001a064f7151f7c83d606 /linux | |
parent | 4b1a4a4ebd1e547ee8e101d4aaeadbaf79d932e1 (diff) | |
parent | 12421f460a798d34a1e6277a1c37cce78fa4956b (diff) |
Merge branch 'fix-dlopen-libsensors-debian' of fasterit/htop
Diffstat (limited to 'linux')
-rw-r--r-- | linux/LibSensors.c | 10 |
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(); |