Message ID | 20190924195237.30519-1-skhan@linuxfoundation.org (mailing list archive) |
---|---|
State | Mainlined |
Commit | 3969e76909d3aa06715997896184ee684f68d164 |
Headers | show |
Series | selftests: pidfd: Fix undefined reference to pthread_create() | expand |
On Tue, Sep 24, 2019 at 01:52:37PM -0600, Shuah Khan wrote: > Fix build failure: > > undefined reference to `pthread_create' > collect2: error: ld returned 1 exit status > > Fix CFLAGS to include pthread correctly. > > Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com> Thanks, Shuah! Queued-up in my fixes branch and will be included after the merge window closes. I'll also add a fixes tag and a cc for stable since this should very likely be backported. Christian
diff --git a/tools/testing/selftests/pidfd/Makefile b/tools/testing/selftests/pidfd/Makefile index 464c9b76148f..7550f08822a3 100644 --- a/tools/testing/selftests/pidfd/Makefile +++ b/tools/testing/selftests/pidfd/Makefile @@ -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
Fix build failure: undefined reference to `pthread_create' collect2: error: ld returned 1 exit status Fix CFLAGS to include pthread correctly. Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> --- tools/testing/selftests/pidfd/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)