--- gcc/config/darwin-driver.cc.orig	2023-10-02 12:36:04
+++ gcc/config/darwin-driver.cc	2023-10-02 13:30:34
@@ -17,6 +17,10 @@
 You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
+
+#ifndef _Atomic
+#define _Atomic volatile
+#endif
 
 #include "config.h"
 #include "libiberty.h"

--- libsanitizer/sanitizer_common/sanitizer_platform.h.orig	2023-10-02 20:27:40
+++ libsanitizer/sanitizer_common/sanitizer_platform.h	2023-10-02 20:28:52
@@ -444,6 +444,10 @@
 #  define SANITIZER_START_BACKGROUND_THREAD_IN_ASAN_INTERNAL 1
 #else
 #  define SANITIZER_START_BACKGROUND_THREAD_IN_ASAN_INTERNAL 0
+#endif
+
+#ifndef _Atomic
+#define _Atomic volatile
 #endif
 
 #endif  // SANITIZER_PLATFORM_H
