https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108331
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #1)
> --- a/libstdc++-v3/config/io/c_io_stdio.h
> +++ b/libstdc++-v3/config/io/c_io_stdio.h
> @@ -39,7 +39,17 @@ namespace std _GLIBCXX_VISIBILITY(default)
> {
> _GLIBCXX_BEGIN_NAMESPACE_VERSION
>
> +#ifdef __GTHREAD_WIN32
> + // The layout of __gthread_mutex_t changed in GCC 13, but libstdc++
> doesn't
> + // actually use the basic_filebuf::_M_lock member, so define it
> consistently
> + // with the old __gthread_mutex_t to avoid an unnecessary layout change:
> + struct __c_lock {
> + long counter;
> + void *sema;
We should use reserved names here, like __unused1 and __unused2.
> + };
> +#else
> typedef __gthread_mutex_t __c_lock;
> +#endif
>
> // for basic_file.h
> typedef FILE __c_file;