]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Add missing headers for errno and std::terminate
authorJonathan Wakely <jwakely@redhat.com>
Mon, 26 Apr 2021 11:28:37 +0000 (12:28 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Tue, 24 Aug 2021 14:13:18 +0000 (15:13 +0100)
libstdc++-v3/ChangeLog:

* include/bits/semaphore_base.h: Include <exception> and <errno.h>.

(cherry picked from commit a38b1a59f8eb6f41a885f8a7c8838378be717b02)

libstdc++-v3/include/bits/semaphore_base.h

index c970fd66a36321a01c07b8d024e2e40fcb32dcbc..c4565d7e56095d5a6aace891e1a9eacb80e80e10 100644 (file)
 #endif // __cpp_lib_atomic_wait
 
 #ifdef _GLIBCXX_HAVE_POSIX_SEMAPHORE
-# include <limits.h>
-# include <semaphore.h>
+# include <exception>  // std::terminate
+# include <cerrno>     // errno, EINTR, EAGAIN etc.
+# include <limits.h>   // SEM_VALUE_MAX
+# include <semaphore.h>        // sem_t, sem_init, sem_wait, sem_post etc.
 #endif
 
 #include <chrono>