commit 4b5a74412ee6ebb69a289acd8a94ef8ddcc6baa8
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Mar 1 17:57:54 2026 +0100

    htl: Fix mt-safeness of libio
    
    Since d2e04918833 ("Single threaded stdio optimization")
    we are supposed to call _IO_enable_locks when creating the first thread,
    but that commit missed doing it for htl.

diff --git a/htl/pt-create.c b/htl/pt-create.c
index ef9e411f22..2a43285372 100644
--- a/htl/pt-create.c
+++ b/htl/pt-create.c
@@ -27,6 +27,7 @@
 #include <atomic.h>
 #include <hurd/resource.h>
 #include <sys/single_threaded.h>
+#include <libioP.h>
 
 #include <pt-internal.h>
 #include <pthreadP.h>
@@ -250,6 +251,9 @@ __pthread_create_internal (struct __pthread **thread,
      avoid calling pthread_self), read it before starting the thread.  */
   *thread = pthread;
 
+  if (start_routine)
+    _IO_enable_locks ();
+
   /* Schedule the new thread.  */
   err = __pthread_thread_start (pthread);
   if (err)
