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 <[email protected]> Cc: Tahera Fahimi <[email protected]> Fixes: c899496 ("selftests/landlock: Test signal scoping for threads") Reviewed-by: Günther Noack <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mickaël Salaün <[email protected]>
1 parent 16a6f4d commit 0e4db4f

File tree

1 file changed

+2
-2
lines changed
  • tools/testing/selftests/landlock

1 file changed

+2
-2
lines changed

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)