Fix linking of libiscsi to libpthread

libiscsi utilizes a bunch of POSIX threads functions but does
not link against libpthread as it should nor the pkg-config file
properly listing libpthread as a static link time dependency.
This commit is contained in:
Brad Smith
2026-03-22 00:44:41 -04:00
parent b7672ecc12
commit 9ab0fa8793
3 changed files with 20 additions and 2 deletions

View File

@@ -21,8 +21,14 @@ if HAVE_LINUX_ISER
libiscsipriv_la_SOURCES += iser.c
endif
libiscsipriv_la_LIBADD =
if HAVE_PTHREAD_SPIN_LOCKS
libiscsipriv_la_LIBADD += -lpthread
endif
if HAVE_LINUX_ISER
libiscsipriv_la_LIBADD = -libverbs -lrdmacm -lpthread
libiscsipriv_la_LIBADD += -libverbs -lrdmacm
endif
libiscsipriv_la_LDFLAGS = -no-undefined