Skip to contentSkip to conversation

Thread-safe libsensors

PATCH New Jean Delvare 1 participant 1 message Mar 6, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Thread-safe libsensors

Hi all,

I noticed that the Suse sensors package is compiled with the following change (amongst many others):

Index: Makefile
=================================--- Makefile (revision 4317)
+++ Makefile (working copy)
@@ -279,7 +279,7 @@
ifdef SYSFS_SUPPORT
LIBCPPFLAGS := $(LIBCPPFLAGS) -DSYSFS_SUPPORT
endif
-LIBCFLAGS := -fpic $(ALL_CFLAGS)
+LIBCFLAGS := -fpic -D_REENTRANT $(ALL_CFLAGS)

.PHONY: all user clean install user_install uninstall user_uninstall version package

I seem to understand that it is required for libsensors to be thread-safe, which would be a nice feature if any multithreaded application ever wants to link with it. So I think I'll apply this patch to our repository before releasing lm_sensors 2.10.3. Comment anyone?

Signature · 1 line
Jean Delvare