stdatomic_test: always use bits/stdatomic.h
Host includes are updated now, so we always must include
bits/stdatomic.h
Bug: 137876753
Bug: 138701943
Test: not yet
Change-Id: Ib2ce34ae5dace8f9a114fa8c04f864cd7f41a5d9
diff --git a/tests/stdatomic_test.cpp b/tests/stdatomic_test.cpp
index a9665d1..9911d64 100644
--- a/tests/stdatomic_test.cpp
+++ b/tests/stdatomic_test.cpp
@@ -16,12 +16,9 @@
#include <gtest/gtest.h>
-#if defined(__ANDROID__)
+// The real <stdatomic.h> checks for the availability of C++'s atomics and uses them if present. Since
+// we want to test the libc versions, we instead include <bits/stdatomic.h> where they're actually defined.
#include <bits/stdatomic.h>
-#else
-#undef _USING_LIBCXX //TODO(b/137876753): Remove this
-#include <stdatomic.h>
-#endif
#include <pthread.h>
#include <stdint.h>