diff --git a/sys/sys/stdatomic.h b/sys/sys/stdatomic.h --- a/sys/sys/stdatomic.h +++ b/sys/sys/stdatomic.h @@ -163,6 +163,11 @@ #endif } +#if defined(__cplusplus) && !defined(_Bool) +#define _Bool bool +#define __bool_locally_defined +#endif + /* * 7.17.5 Lock-free property. */ @@ -406,4 +411,9 @@ } #endif /* !_KERNEL */ +#ifdef __bool_locally_defined +#undef _Bool +#undef __bool_locally_defined +#endif + #endif /* !_STDATOMIC_H_ */