aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/port
diff options
context:
space:
mode:
authorAlex <alex>2012-10-22 01:46:31 -0400
committerAlex <alex>2012-10-22 01:46:31 -0400
commit17bfb1f4378445aaf5b3c3afdd47e289e22c0545 (patch)
tree3d8f0ba7676938583b22f5159dec9ec72494ea3e /src/leveldb/port
parent2ef15697f84208e05764046dd86bcf067029a9b8 (diff)
Fixed compile error on FreeBSD 9.
See http://code.google.com/p/leveldb/issues/detail?id=98
Diffstat (limited to 'src/leveldb/port')
-rw-r--r--src/leveldb/port/port_posix.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/leveldb/port/port_posix.h b/src/leveldb/port/port_posix.h
index 654a4b9d3d..6ca352e2ca 100644
--- a/src/leveldb/port/port_posix.h
+++ b/src/leveldb/port/port_posix.h
@@ -21,13 +21,20 @@
#else
#define PLATFORM_IS_LITTLE_ENDIAN false
#endif
-#elif defined(OS_FREEBSD) || defined(OS_OPENBSD) || defined(OS_NETBSD) ||\
+#elif defined(OS_FREEBSD)
+ #include <sys/types.h>
+ #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)
#include <sys/types.h>
#include <sys/endian.h>
+#elif defined(OS_HPUX)
+ #define PLATFORM_IS_LITTLE_ENDIAN false
#else
#include <endian.h>
#endif
+
#include <pthread.h>
#ifdef SNAPPY
#include <snappy.h>
@@ -42,7 +49,7 @@
#if defined(OS_MACOSX) || defined(OS_SOLARIS) || defined(OS_FREEBSD) ||\
defined(OS_NETBSD) || defined(OS_OPENBSD) || defined(OS_DRAGONFLYBSD) ||\
- defined(OS_ANDROID)
+ defined(OS_ANDROID) || defined(OS_HPUX)
// Use fread/fwrite/fflush on platforms without _unlocked variants
#define fread_unlocked fread
#define fwrite_unlocked fwrite