From c08ba4464d33ae3ecfc1c26c549597bcda429296 Mon Sep 17 00:00:00 2001 From: Liu Qun <517067180@qq.com> Date: Mon, 6 May 2019 17:17:07 +0800 Subject: [PATCH] Fix up libpthread linking error with dtls/server-dtls-threaded Signed-off-by: Liu Qun <517067180@qq.com> --- dtls/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dtls/Makefile b/dtls/Makefile index f49edfac..5297077f 100644 --- a/dtls/Makefile +++ b/dtls/Makefile @@ -28,6 +28,10 @@ all: $(TARGETS) debug: CFLAGS+=$(DEBUG_FLAGS) debug: all +# add the -pthread flag and -lpthread lib to any threaded examples +%-threaded: CFLAGS+=-pthread +%-threaded: LIBS+=-lpthread + # build template %: %.c $(CC) -o $@ $< $(CFLAGS) $(LIBS)