From: Samuel Thibault Date: Sun, 1 Mar 2026 16:57:54 +0000 (+0100) Subject: htl: Fix mt-safeness of libio X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b5a74412ee6ebb69a289acd8a94ef8ddcc6baa8;p=thirdparty%2Fglibc.git 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 #include #include +#include #include #include @@ -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)