Skip to content

Commit 0e4db4f

Browse files
committed
selftests/landlock: Fix build with non-default pthread linking
Old toolchains require explicit -lpthread (e.g. on Debian 11). Cc: Nathan Chancellor <nathan@kernel.org> Cc: Tahera Fahimi <fahimitahera@gmail.com> Fixes: c899496 ("selftests/landlock: Test signal scoping for threads") Reviewed-by: Günther Noack <gnoack3000@gmail.com> Link: https://lore.kernel.org/r/20250115145409.312226-1-mic@digikod.net Signed-off-by: Mickaël Salaün <mic@digikod.net>
1 parent 16a6f4d commit 0e4db4f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • tools/testing/selftests/landlock

tools/testing/selftests/landlock/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ TEST_GEN_PROGS := $(src_test:.c=)
1313
TEST_GEN_PROGS_EXTENDED := true
1414

1515
# Short targets:
16-
$(TEST_GEN_PROGS): LDLIBS += -lcap
16+
$(TEST_GEN_PROGS): LDLIBS += -lcap -lpthread
1717
$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static
1818

1919
include ../lib.mk
2020

2121
# Targets with $(OUTPUT)/ prefix:
22-
$(TEST_GEN_PROGS): LDLIBS += -lcap
22+
$(TEST_GEN_PROGS): LDLIBS += -lcap -lpthread
2323
$(TEST_GEN_PROGS_EXTENDED): LDFLAGS += -static

0 commit comments

Comments
 (0)