diff options
| author | Jeff Garzik <[email protected]> | 2012-11-15 18:31:20 -0800 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2012-11-15 18:31:20 -0800 |
| commit | 848c0d5d95b7be098f50a37a046d9c33cea0224f (patch) | |
| tree | f63121c3c8cff12ae9b53a2e4428a95464c715d8 | |
| parent | Merge pull request #1987 from jgarzik/no-pw-match (diff) | |
| parent | Fixed compile error on FreeBSD 9. (diff) | |
| download | discoin-848c0d5d95b7be098f50a37a046d9c33cea0224f.tar.xz discoin-848c0d5d95b7be098f50a37a046d9c33cea0224f.zip | |
Merge pull request #1945 from centromere/leveldb_fix
Fixed compile error on FreeBSD 9.
| -rw-r--r-- | src/leveldb/port/port_posix.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/leveldb/port/port_posix.h b/src/leveldb/port/port_posix.h index 654a4b9d3..6ca352e2c 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 |