NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/56191: ZFS tests fail on sparc64
The following reply was made to PR kern/56191; it has been noted by GNATS.
From: "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost>
To: NetBSD GNATS <gnats-bugs%netbsd.org@localhost>
Cc:
Subject: Re: kern/56191: ZFS tests fail on sparc64
Date: Fri, 21 May 2021 14:23:44 +0200
--Apple-Mail=_72868C3E-4847-453B-9143-D8E557F28218
Content-Type: multipart/mixed;
boundary="Apple-Mail=_A3C04EE1-85E8-402C-89CB-ED1DE0233B22"
--Apple-Mail=_A3C04EE1-85E8-402C-89CB-ED1DE0233B22
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii
Please try the attached diff.
--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig
--Apple-Mail=_A3C04EE1-85E8-402C-89CB-ED1DE0233B22
Content-Disposition: attachment;
filename=002_nvpair_endian.diff
Content-Type: application/octet-stream;
x-unix-mode=0644;
name="002_nvpair_endian.diff"
Content-Transfer-Encoding: 7bit
nvpair_endian
Replace the Solaris style endian check (exactly one of
_LITTLE_ENDIAN or _BIG_ENDIAN is defined) with standard check
"#if BYTE_ORDER == BIG_ENDIAN" like we do it elseware.
Should fix PR 56191 (ZFS tests fail on sparc64)
diff -r 628b20895fb3 -r 7b8c2578f1d8 external/cddl/osnet/dist/common/nvpair/nvpair.c
--- external/cddl/osnet/dist/common/nvpair/nvpair.c
+++ external/cddl/osnet/dist/common/nvpair/nvpair.c
@@ -2255,11 +2255,11 @@ nvlist_common(nvlist_t *nvl, char *buf,
int err = 0;
nvstream_t nvs;
int nvl_endian;
-#ifdef _LITTLE_ENDIAN
- int host_endian = 1;
+#if BYTE_ORDER == BIG_ENDIAN
+ int host_endian = 0;
#else
- int host_endian = 0;
-#endif /* _LITTLE_ENDIAN */
+ int host_endian = 1;
+#endif /* BYTE_ORDER */
nvs_header_t *nvh = (void *)buf;
if (buflen == NULL || nvl == NULL ||
--Apple-Mail=_A3C04EE1-85E8-402C-89CB-ED1DE0233B22--
--Apple-Mail=_72868C3E-4847-453B-9143-D8E557F28218
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename=signature.asc
Content-Type: application/pgp-signature;
name=signature.asc
Content-Description: Message signed with OpenPGP
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEE2BL3ha7Xao4WUZVYKoaVJdNr+uEFAmCnplAACgkQKoaVJdNr
+uFjSAf/RPqUzfEMFhBKVB9B9omAndao8oh1QOyPnB6f6JyQLNg3jbK04PZihKbR
PM83SnDZ9CNKT4E72o25AyzIlh9G0ezwEWMpqh/QWIWt3o6QYB3wL13xy/CGShwh
nTu5VHJ/s02F0r79xJqnYmvNX3vva54S2PBhFuGNNQV4/WvFJoxPqYqoVtbwPwYK
8EBIA0sMXl9Hh1YaYasTxX/Xo83NlZt+try0ximHLpQfUXJuiAult+oJkoxBqh3t
+g031zTmnWCBNC8d/yzJcMeT/2J4kFs01F4g63qbC7AMN4t3LMxzx0Mw4nz07UnH
T+/n3mR98FhV9Xd3afqAZEBwNccfDA==
=nvSV
-----END PGP SIGNATURE-----
--Apple-Mail=_72868C3E-4847-453B-9143-D8E557F28218--
Home |
Main Index |
Thread Index |
Old Index