diff mbox series

libtracefs: Add -lpthread to build

Message ID 20210408205512.52c385d0@oasis.local.home (mailing list archive)
State Accepted
Commit f234e6c5c16fe8adb897f88812c3ada727e25ef2
Headers show
Series libtracefs: Add -lpthread to build | expand

Commit Message

Steven Rostedt April 9, 2021, 12:55 a.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

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.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index ff1a3a6..b7f7f76 100644
--- a/Makefile
+++ b/Makefile
@@ -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