From 333bc6dd20e7553a6337fddfe2531cafd33cfb32 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Wed, 26 Jun 2024 16:55:44 +0200 Subject: [PATCH] cannot count CCDs when LibSensors was not found --- linux/LibSensors.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux/LibSensors.c b/linux/LibSensors.c index c970f9d17..6df1a5cd8 100644 --- a/linux/LibSensors.c +++ b/linux/LibSensors.c @@ -158,6 +158,12 @@ static int tempDriverPriority(const sensors_chip_name* chip) { } int LibSensors_countCCDs(void) { + +#ifndef BUILD_STATIC + if (!dlopenHandle) + return 0; +#endif /* !BUILD_STATIC */ + int ccds = 0; int n = 0;