summaryrefslogtreecommitdiff
path: root/port
diff options
context:
space:
mode:
authorSanjay Ghemawat <sanjay@google.com>2012-12-27 10:38:48 -0800
committerSanjay Ghemawat <sanjay@google.com>2012-12-27 10:38:48 -0800
commitea2e9195fc241c8fe9f329679d7a424345c68c7b (patch)
tree9622a938d771bf92d5ed13e1cfc2fada8a80ec15 /port
parent40768657bc8ec3ded60712eeeab7c25b1b07deca (diff)
downloadleveldb-ea2e9195fc241c8fe9f329679d7a424345c68c7b.tar.gz
added utility to dump leveldb filesv1.8
Diffstat (limited to 'port')
-rw-r--r--port/port_posix.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/port/port_posix.h b/port/port_posix.h
index 6ca352e..f2b89bf 100644
--- a/port/port_posix.h
+++ b/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