From 785a028ab70da332bf0d573c7fc3d7bb0c4f7273 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 14 May 2026 17:20:02 -0300 Subject: [PATCH] elf: Fix elf/tst-bz26577-minstack.c on hurd Hurd does not defined PTHREAD_STACK_MIN, use support_small_thread_stack_size instead. Checked on a x86_64-gnu build. --- elf/tst-bz26577-minstack.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/elf/tst-bz26577-minstack.c b/elf/tst-bz26577-minstack.c index 6b8fa5e9bf..f49011290f 100644 --- a/elf/tst-bz26577-minstack.c +++ b/elf/tst-bz26577-minstack.c @@ -51,10 +51,16 @@ static int do_test (void) { char *path = xasprintf ("%s/elf/tst-bz26577-mod.so", support_objdir_root); + size_t stacksize = +#ifdef PTHREAD_STACK_MIN + PTHREAD_STACK_MIN +#else + support_small_thread_stack_size (); +#endif pthread_attr_t attr; xpthread_attr_init (&attr); - xpthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN); + xpthread_attr_setstacksize (&attr, stacksize); pthread_t thr = xpthread_create (&attr, dlopen_thread, path); xpthread_join (thr); xpthread_attr_destroy (&attr); -- 2.47.3