C23 addition of once_flag to <stdlib.h>

Dominik 'Rathann' Mierzejewski dominik@greysector.net
Fri Nov 7 19:41:32 GMT 2025


Hello!

On Friday, 07 November 2025 at 14:43, Florian Weimer wrote:
> We made this change recently in glibc:
> 
> commit a7ddbf456d97ac8d1aa7afd735e196a1488bd874
> Author: Joseph Myers <josmyers@redhat.com>
> Date:   Wed Oct 1 15:15:15 2025 +0000
> 
>     Add once_flag, ONCE_FLAG_INIT and call_once to stdlib.h for C23
>     
>     C23 adds once_flag, ONCE_FLAG_INIT and call_once to stdlib.h (in C11
>     they were only in threads.h, in C23 they are in both headers; this
>     change came from N2840).  Implement this change, with a
>     bits/types/once_flag.h header for the common type and initializer
>     definitions.
>     
>     Note that there's an omnibus bug (bug 33001) that covers more than
>     just these missing definitions.
>     
>     This doesn't seem a significant enough feature to be worth mentioning
>     in NEWS.

I'd say it is significant enough, because it's causing several projects
to fail to build, i.e.:
baresip and libre: https://bugzilla.redhat.com/show_bug.cgi?id=2412438
obs-studio: https://bugzilla.redhat.com/show_bug.cgi?id=2413095
icecat: https://bugzilla.redhat.com/show_bug.cgi?id=2413096
firefox (not reported yet)
thunderbird (not reported yet)
and probably more.

Regards,
Dominik
-- 
Fedora   https://fedoraproject.org
Deep in the human unconscious is a pervasive need for a logical universe that
makes sense. But the real universe is always one step beyond logic.
        -- from "The Sayings of Muad'Dib" by the Princess Irulan


More information about the Libc-alpha mailing list