Files
libreoffice/boost/boost.endian.patch
Tor Lillqvist 58b9060b5f Fix Boost endianness detection for Android
Change-Id: I88006cced5975fc0748b33094ae39197daba49cc
2013-05-24 14:58:56 +03:00

23 lines
755 B
Diff

--- 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.