diff options
Diffstat (limited to 'libcxx/src/locale.cpp')
-rw-r--r-- | libcxx/src/locale.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp index 3b4c83a0900..a6cb0e97d12 100644 --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -36,6 +36,7 @@ #endif #include <stdlib.h> #include <stdio.h> +#include "include/atomic_support.h" #include "__undef_macros" // On Linux, wint_t and wchar_t have different signed-ness, and this causes @@ -667,7 +668,7 @@ locale::id::__get() void locale::id::__init() { - __id_ = __sync_add_and_fetch(&__next_id, 1); + __id_ = __libcpp_atomic_add(&__next_id, 1); } // template <> class collate_byname<char> |