selftests: pidfd: Fix undefined reference to pthread_create()
authorShuah Khan <skhan@linuxfoundation.org>
Tue, 24 Sep 2019 19:52:37 +0000 (13:52 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Oct 2019 16:36:10 +0000 (18:36 +0200)
commit 3969e76909d3aa06715997896184ee684f68d164 upstream.

Fix build failure:

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

Fix CFLAGS to include pthread correctly.

Fixes: 740378dc7834 ("pidfd: add polling selftests")
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20190924195237.30519-1-skhan@linuxfoundation.org
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/pidfd/Makefile

index 720b2d884b3c52560d86078c704b1696a89c5a9d..e86141796444146034048a4a257af920f762a6e6 100644 (file)
@@ -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