Fixed the zpool and zfs commands returning 'internal error: Out of memory.' due to a failure in nvlist_common().

The failure turned out to be missing macro definitions for little
endian and big endian.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Ricardo M. Correia 2009-07-14 15:31:03 -07:00 committed by Brian Behlendorf
parent 5427e1eec2
commit 4279777f47
1 changed files with 20 additions and 0 deletions

View File

@ -50,6 +50,10 @@ extern "C" {
#define _LP64
#endif
#if !defined(_LITTLE_ENDIAN)
#define _LITTLE_ENDIAN
#endif
#define _SUNOS_VTOC_16
/* i386 arch specific defines */
@ -67,6 +71,10 @@ extern "C" {
#define _ILP32
#endif
#if !defined(_LITTLE_ENDIAN)
#define _LITTLE_ENDIAN
#endif
#define _SUNOS_VTOC_16
/* powerpc arch specific defines */
@ -88,6 +96,10 @@ extern "C" {
#endif
#endif
#if !defined(_BIG_ENDIAN)
#define _BIG_ENDIAN
#endif
#define _SUNOS_VTOC_16
#else /* Currently only x86_64, i386, and powerpc arches supported */
@ -98,6 +110,14 @@ extern "C" {
#error "Both _ILP32 and _LP64 are defined"
#endif
#if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN)
#error "Both _LITTLE_ENDIAN and _BIG_ENDIAN are defined"
#endif
#if !defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
#error "Neither _LITTLE_ENDIAN nor _BIG_ENDIAN are defined"
#endif
#ifdef __cplusplus
}
#endif