diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp
--- a/libcxx/src/atomic.cpp
+++ b/libcxx/src/atomic.cpp
@@ -15,6 +15,8 @@
 #include <functional>
 #include <thread>
 
+#include "include/apple_availability.h"
+
 #ifdef __linux__
 
 #include <unistd.h>