Skip to content

Commit

Permalink
selftests: pidfd: Fix undefined reference to pthread_create()
Browse files Browse the repository at this point in the history
Fix build failure:

undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status

Fix CFLAGS to include pthread correctly.

Fixes: 740378d ("pidfd: add polling selftests")
Signed-off-by: Shuah Khan <[email protected]>
Reviewed-by: Christian Brauner <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
  • Loading branch information
shuahkh authored and Christian Brauner committed Sep 30, 2019
1 parent 61129dd commit 3969e76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/pidfd/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
CFLAGS += -g -I../../../../usr/include/ -lpthread
CFLAGS += -g -I../../../../usr/include/ -pthread

TEST_GEN_PROGS := pidfd_test pidfd_open_test pidfd_poll_test pidfd_wait

Expand Down

0 comments on commit 3969e76

Please sign in to comment.