aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/port
diff options
context:
space:
mode:
authorSanjay Ghemawat <sanjay@google.com>2012-12-27 10:38:48 -0800
committerGavin Andresen <gavinandresen@gmail.com>2013-01-23 14:00:29 -0500
commitf79ddf24a967a0043270b2999921550c6c366ec4 (patch)
tree2f4819b34a46cd15ef6b985a0d367d0b0cf3f77f /src/leveldb/port
parentb1024662eafddd5560fbfbac29333e5e967ca0f8 (diff)
downloadbitcoin-f79ddf24a967a0043270b2999921550c6c366ec4.tar.xz
added utility to dump leveldb files
Diffstat (limited to 'src/leveldb/port')
-rw-r--r--src/leveldb/port/port_posix.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/leveldb/port/port_posix.h b/src/leveldb/port/port_posix.h
index 6ca352e2ca..f2b89bffb9 100644
--- a/src/leveldb/port/port_posix.h
+++ b/src/leveldb/port/port_posix.h
@@ -26,11 +26,17 @@
#include <sys/endian.h>
#define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
#elif defined(OS_OPENBSD) || defined(OS_NETBSD) ||\
- defined(OS_DRAGONFLYBSD) || defined(OS_ANDROID)
+ defined(OS_DRAGONFLYBSD)
#include <sys/types.h>
#include <sys/endian.h>
#elif defined(OS_HPUX)
#define PLATFORM_IS_LITTLE_ENDIAN false
+#elif defined(OS_ANDROID)
+ // Due to a bug in the NDK x86 <sys/endian.h> definition,
+ // _BYTE_ORDER must be used instead of __BYTE_ORDER on Android.
+ // See http://code.google.com/p/android/issues/detail?id=39824
+ #include <endian.h>
+ #define PLATFORM_IS_LITTLE_ENDIAN (_BYTE_ORDER == _LITTLE_ENDIAN)
#else
#include <endian.h>
#endif