Skip to content

Commit

Permalink
libspl_assert: always link -lpthread on FreeBSD
Browse files Browse the repository at this point in the history
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.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes openzfs#16168
  • Loading branch information
robn authored and tonyhutter committed Jul 17, 2024
1 parent bc42d96 commit 2a2e358
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/libspl/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2a2e358

Please sign in to comment.