https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103638

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>:

https://gcc.gnu.org/g:ffb632517fc446474baba10ee2ff13a218ec2c7b

commit r12-5895-gffb632517fc446474baba10ee2ff13a218ec2c7b
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Fri Dec 10 11:44:29 2021 +0000

    libstdc++: Guard mutex and condvar with gthreads macro [PR103638]

    A mutex and condition variable is used for timed waits on atomics if
    there is no "platform wait" (e.g. futex) supported. But the use of those
    types wasn't guarded by the _GLIBCXX_HAS_GTHREADS macro, causing errors
    for --disable-threads builds. This fix allows <atomic> to work on
    targets with futexes but no gthreads.

    libstdc++-v3/ChangeLog:

            PR libstdc++/103638
            * include/bits/atomic_timed_wait.h: Check _GLIBCXX_HAS_GTHREADS
            before using std::mutex and std::__condvar.

Reply via email to