summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-05-24 14:57:20 +0300
committerTor Lillqvist <tml@iki.fi>2013-05-24 14:58:56 +0300
commit58b9060b5f325f611dd7d5748dfa41b897aa09eb (patch)
treee6f888434c6a2c09ebc29c650e599ae74fcdb6ff
parentd972b212f6f7a2b40ed85ba2ec08a228decc3f70 (diff)
Fix Boost endianness detection for Android
Change-Id: I88006cced5975fc0748b33094ae39197daba49cc
-rw-r--r--boost/UnpackedTarball_boost.mk1
-rw-r--r--boost/boost.endian.patch22
2 files changed, 23 insertions, 0 deletions
diff --git a/boost/UnpackedTarball_boost.mk b/boost/UnpackedTarball_boost.mk
index 75eb479ed3fa..bcec8b99bd9e 100644
--- a/boost/UnpackedTarball_boost.mk
+++ b/boost/UnpackedTarball_boost.mk
@@ -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
diff --git a/boost/boost.endian.patch b/boost/boost.endian.patch
new file mode 100644
index 000000000000..bf129f7bb080
--- /dev/null
+++ b/boost/boost.endian.patch
@@ -0,0 +1,22 @@
+--- 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.