From 30fc526c6ee76c2fd9c724c95223a13c9d021edd Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 31 Oct 2019 12:53:30 -0700 Subject: [PATCH] Link with -lpthread if iSER is enabled This patch fixes the following linker error: /usr/bin/ld: ../lib/.libs/libiscsipriv.a(libiscsipriv_la-iser.o): undefined reference to symbol 'sem_post@@GLIBC_2.2.5' /usr/bin/ld: //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line Signed-off-by: Bart Van Assche --- lib/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 7161ed2..4a8a916 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -17,7 +17,7 @@ libiscsipriv_la_SOURCES += iser.c endif if HAVE_LINUX_ISER -libiscsipriv_la_LDFLAGS = -libverbs -lrdmacm +libiscsipriv_la_LDFLAGS = -libverbs -lrdmacm -lpthread endif libiscsipriv_la_CPPFLAGS = -I${srcdir}/../include -I$(srcdir)/include \