From 7d2b6299408eedcbb47579e48bf8b451899218e0 Mon Sep 17 00:00:00 2001 From: jb Date: Wed, 28 Nov 2007 22:12:21 +0000 Subject: [PATCH] Check endianness the FreeBSD way. --- sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c | 2 +- sys/contrib/opensolaris/common/nvpair/nvpair.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c b/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c index a1e61904e68b..d3d5bed525ab 100644 --- a/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c +++ b/sys/cddl/contrib/opensolaris/common/nvpair/nvpair.c @@ -1918,7 +1918,7 @@ nvlist_common(nvlist_t *nvl, char *buf, size_t *buflen, int encoding, int err = 0; nvstream_t nvs; int nvl_endian; -#ifdef _LITTLE_ENDIAN +#if BYTE_ORDER == _LITTLE_ENDIAN int host_endian = 1; #else int host_endian = 0; diff --git a/sys/contrib/opensolaris/common/nvpair/nvpair.c b/sys/contrib/opensolaris/common/nvpair/nvpair.c index a1e61904e68b..d3d5bed525ab 100644 --- a/sys/contrib/opensolaris/common/nvpair/nvpair.c +++ b/sys/contrib/opensolaris/common/nvpair/nvpair.c @@ -1918,7 +1918,7 @@ nvlist_common(nvlist_t *nvl, char *buf, size_t *buflen, int encoding, int err = 0; nvstream_t nvs; int nvl_endian; -#ifdef _LITTLE_ENDIAN +#if BYTE_ORDER == _LITTLE_ENDIAN int host_endian = 1; #else int host_endian = 0;