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;