summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2018-02-07 10:01:55 -0800
committerAndreas Gampe <agampe@google.com>2018-02-07 19:50:27 +0000
commit0b3ea84b83c3fa8108f9879d7f141445644fcde8 (patch)
tree8655e821c6537a4857c9c3010f39bd032c977068
parentd16be73edc77bd60c0febc9b945601aa6c8ed5c2 (diff)
downloadlibtextclassifier-o-mr1-iot-preview-7.tar.gz
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
-rw-r--r--util/base/endian.h2
1 files changed, 1 insertions, 1 deletions
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 @@ namespace libtextclassifier {
// 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.