Add bionic support to endian.h
Bionic supports byteswap. Protobuf will support bionic in the near future,
which leads to macro-redefinition errors. Add recognition of bionic.
Bug: 72746797
Test: mmma external/libtextclassifier
Merged-In: I65cb7f0b067b68e3e1c22ee87232555887446089
Change-Id: I7fd9a1335a4b6cac51ab8e183d71a4e21ac59fee
diff --git a/util/base/endian.h b/util/base/endian.h
index f319f65..75f8bf7 100644
--- a/util/base/endian.h
+++ b/util/base/endian.h
@@ -40,7 +40,7 @@
// The following guarantees declaration of the byte swap functions, and
// defines __BYTE_ORDER for MSVC
-#if defined(__GLIBC__) || defined(__CYGWIN__)
+#if defined(__GLIBC__) || defined(__BIONIC__) || defined(__CYGWIN__)
#include <byteswap.h> // IWYU pragma: export
// The following section defines the byte swap functions for OS X / iOS,
// which does not ship with byteswap.h.