From f0c28a5cd8877306d0cf87cd0bb42867dc907702 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Mon, 6 May 2024 15:58:05 +1000 Subject: [PATCH] libspl_assert: always link -lpthread on FreeBSD The pthread_* functions are in -lpthread on FreeBSD. Some of them are implicitly linked through libc, but on FreeBSD 13 at least pthread_getname_np() is not. Just be explicit, since -lpthread is the documented interface anyway. Signed-off-by: Rob Norris Sponsored-by: https://despairlabs.com/sponsor/ --- lib/libspl/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libspl/Makefile.am b/lib/libspl/Makefile.am index eb2377305a..94be416d46 100644 --- a/lib/libspl/Makefile.am +++ b/lib/libspl/Makefile.am @@ -45,3 +45,7 @@ libspl_la_LIBADD = \ libspl_la_LIBADD += $(LIBATOMIC_LIBS) $(LIBCLOCK_GETTIME) libspl_assert_la_LIBADD = $(BACKTRACE_LIBS) $(LIBUNWIND_LIBS) + +if BUILD_FREEBSD +libspl_assert_la_LIBADD += -lpthread +endif