===================================================================
@@ -0,0 +1 @@
+CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE -fexceptions -frtti
===================================================================
@@ -2474,6 +2474,9 @@ case "${target}" in
nios2-*-elf*)
target_makefile_frag="config/mt-nios2-elf"
;;
+ *-*-linux-android*)
+ target_makefile_frag="config/mt-android"
+ ;;
*-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
target_makefile_frag="config/mt-gnu"
;;
===================================================================
@@ -146,7 +146,8 @@ fs::_Dir::advance(error_code* ec, direct
int err = std::exchange(errno, 0);
const auto entp = readdir(dirp);
- std::swap(errno, err);
+ // std::swap cannot be used with Bionic's errno
+ err = std::exchange(errno, err);
if (entp)
{