Skip to content

Commit a632817

Browse files
committed
[android] Update headers that were split in NDK 23
NDK 23 split stdatomic.h up and that causes problems when invoked from C++ files, so use the new bits/stdatomic.h instead as a workaround, as seen in the test for aosp-mirror/platform_bionic@76e2b15.
1 parent 9b68b04 commit a632817

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/shims/atomic.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@
3535
#if defined(__cplusplus)
3636
#define _Bool bool
3737
#endif
38+
#if defined(__ANDROID__) && __NDK_MAJOR__ >= 23
39+
#include <bits/stdatomic.h>
40+
#else
3841
#include <stdatomic.h>
42+
#endif
3943

4044
#define memory_order_ordered memory_order_seq_cst
4145
#define memory_order_dependency memory_order_acquire

0 commit comments

Comments
 (0)