]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Fix elf/tst-bz26577-minstack.c on hurd
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 14 May 2026 20:20:02 +0000 (17:20 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 14 May 2026 20:20:02 +0000 (17:20 -0300)
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

index 6b8fa5e9bf4fe6037fa2c5a22208aa180ad90f13..f49011290f94ce7272d6680976113822946000c4 100644 (file)
@@ -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);