[gcc r12-124] libstdc++: Add missing headers for errno and std::terminate
Jonathan Wakely
redi@gcc.gnu.org
Mon Apr 26 11:31:53 GMT 2021
https://gcc.gnu.org/g:a38b1a59f8eb6f41a885f8a7c8838378be717b02
commit r12-124-ga38b1a59f8eb6f41a885f8a7c8838378be717b02
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Apr 26 12:28:37 2021 +0100
libstdc++: Add missing headers for errno and std::terminate
libstdc++-v3/ChangeLog:
* include/bits/semaphore_base.h: Include <exception> and <errno.h>.
Diff:
---
libstdc++-v3/include/bits/semaphore_base.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/include/bits/semaphore_base.h b/libstdc++-v3/include/bits/semaphore_base.h
index 4948f0fd0bc..9a55978068f 100644
--- a/libstdc++-v3/include/bits/semaphore_base.h
+++ b/libstdc++-v3/include/bits/semaphore_base.h
@@ -39,8 +39,10 @@
#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>
More information about the Libstdc++-cvs
mailing list