Kaydet (Commit) 58b9060b authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Fix Boost endianness detection for Android

Change-Id: I88006cced5975fc0748b33094ae39197daba49cc
üst d972b212
......@@ -37,6 +37,7 @@ boost_patches += boost_1_44_0-clang-warnings.patch
boost_patches += boost_1_44_0-gcc4.8.patch
boost_patches += boost.auto_link.patch
boost_patches += boost.endian.patch
boost_patches += boost.loplugin.patch
boost_patches += boost.std.move.patch
boost_patches += boost.wundef.patch
......
--- foo/foo/foo/boost/detail/endian.hpp
+++ foo/foo/foo/boost/detail/endian.hpp
@@ -28,16 +28,16 @@
#ifndef BOOST_DETAIL_ENDIAN_HPP
#define BOOST_DETAIL_ENDIAN_HPP
-// GNU libc offers the helpful header <endian.h> which defines
+// GNU libc and Android's bionic offer the helpful header <endian.h> which defines
// __BYTE_ORDER
-#if defined (__GLIBC__)
+#if defined (__GLIBC__) || defined(__ANDROID__)
# include <endian.h>
# if (__BYTE_ORDER == __LITTLE_ENDIAN)
# define BOOST_LITTLE_ENDIAN
# elif (__BYTE_ORDER == __BIG_ENDIAN)
# define BOOST_BIG_ENDIAN
-# elif (__BYTE_ORDER == __PDP_ENDIAN)
+# elif defined(__PDP_ENDIAN) && (__BYTE_ORDER == __PDP_ENDIAN)
# define BOOST_PDP_ENDIAN
# else
# error Unknown machine endianness detected.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment