mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 10:54:35 +03:00
Prefix zfs internal endian checks with _ZFS
FreeBSD defines _BIG_ENDIAN BIG_ENDIAN _LITTLE_ENDIAN LITTLE_ENDIAN on every architecture. Trying to do cross builds whilst hiding this from ZFS has proven extremely cumbersome. Reviewed-by: Ryan Moeller <ryan@ixsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10621
This commit is contained in:
@@ -2555,11 +2555,13 @@ 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 defined(_ZFS_LITTLE_ENDIAN)
|
||||
int host_endian = 1;
|
||||
#else
|
||||
#elif defined(_ZFS_BIG_ENDIAN)
|
||||
int host_endian = 0;
|
||||
#endif /* _LITTLE_ENDIAN */
|
||||
#else
|
||||
#error "No endian defined!"
|
||||
#endif /* _ZFS_LITTLE_ENDIAN */
|
||||
nvs_header_t *nvh;
|
||||
|
||||
if (buflen == NULL || nvl == NULL ||
|
||||
|
||||
Reference in New Issue
Block a user