package/stress-ng: fix non-NPTL build
PATCH 1/1 package/stress-ng: fix non-NPTL build
Buildroot commit 2ce329692ab60da7fe7ccd52bf64a8c4802fb317 bumped stress-ng to version 0.19.06 which includes commit
https://github.com/ColinIanKing/stress-ng/commit/15b26e33daaf36acd5eeceaaf6fc954f46792a8b
This commit breaks the build with non-NPTL toolchains.
Fixes:
https://autobuild.buildroot.net/results/d4f/d4fadef213455b1776d93e30e51ffe09fb1879c5/
--- ...01-stress-pthread-fix-non-NPTL-build.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 package/stress-ng/0001-stress-pthread-fix-non-NPTL-build.patch
package/stress-ng/0001-stress-pthread-fix-non-NPTL-build.patch new file +42 -0
@@ -0,0 +1,42 @@ +From 73d1f5ed2167fca8a1cbfb85f4da123f00e524a1 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +Date: Sun, 30 Nov 2025 11:36:10 +0100 +Subject: [PATCH] stress-pthread: fix non-NPTL build + +https://github.com/ColinIanKing/stress-ng/commit/15b26e33daaf36acd5eeceaaf6fc954f46792a8b +added the usage of attr without using HAVE_PTHREAD_ATTR_SETSTACK for +toolchains without NPTL support. + +This patch fixes build errors detected by buildroot autobuilders: +https://autobuild.buildroot.net/results/d4f/d4fadef213455b1776d93e30e51ffe09fb1879c5/build-end.log + +stress-pthread.c: In function 'stress_pthread': +stress-pthread.c:567:81: error: 'attr' undeclared (first use in this function) + 567 | pthreads[i].ret = pthread_create(&pthreads[i].pthread, &attr, + +Upstream: https://github.com/ColinIanKing/stress-ng/pull/593 + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + stress-pthread.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/stress-pthread.c b/stress-pthread.c +index aafcf0f0a..8605b7a1d 100644 +--- a/stress-pthread.c ++++ b/stress-pthread.c +@@ -564,7 +564,11 @@ static int stress_pthread(stress_args_t *args) + + pthreads[i].t_create = stress_time_now(); + pthreads[i].t_run = pthreads[i].t_create; ++#if defined(HAVE_PTHREAD_ATTR_SETSTACK) + pthreads[i].ret = pthread_create(&pthreads[i].pthread, &attr, ++#else ++ pthreads[i].ret = pthread_create(&pthreads[i].pthread, NULL, ++#endif + stress_pthread_func, (void *)&pargs); + if (UNLIKELY(pthreads[i].ret)) { + /* Out of resources, don't try any more */ +-- +2.47.3 +
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Bernd" == Bernd Kuhls <[email protected]> writes:
Buildroot commit
2ce329692ab60da7fe7ccd52bf64a8c4802fb317bumped stress-ng to version 0.19.06 which includes commit
https://github.com/ColinIanKing/stress-ng/commit/15b26e33daaf36acd5eeceaaf6fc954f46792a8b
Quoted 6 lines
This commit breaks the build with non-NPTL toolchains.
Fixes:
https://autobuild.buildroot.net/results/d4f/d4fadef213455b1776d93e30e51ffe09fb1879c5/Signed-off-by Bernd Kuhls <[email protected]>
Committed, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot