Skip to contentSkip to conversation

libtracefs: Add -lpthread to build

PATCH New Steven Rostedt 1 participant 1 message Apr 9, 2021 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libtracefs: Add -lpthread to build

From: "Steven Rostedt (VMware)" <[email protected]>

In order to use pthread functions, include -lpthread to the linked libraries to make sure that applications that include -ltracefs do not require to have -lpthread as well, if the application is not using pthreads.

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index ff1a3a6..b7f7f76 100644
@@ -138,7 +138,7 @@ LIBTRACEFS_SHARED = $(bdir)/libtracefs.so.$(TRACEFS_VERSION)
 PKG_CONFIG_SOURCE_FILE = libtracefs.pc
 PKG_CONFIG_FILE := $(addprefix $(obj)/,$(PKG_CONFIG_SOURCE_FILE))
 
-LIBS = $(LIBTRACEEVENT_LIBS)
+LIBS = $(LIBTRACEEVENT_LIBS) -lpthread
 
 export LIBS
 export LIBTRACEFS_STATIC LIBTRACEFS_SHARED
Signature · 1 line
2.29.2