diff --git a/libc-test/build.rs b/libc-test/build.rs index 3f7e1d73587bf..794dadaa676f1 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -4427,8 +4427,6 @@ fn test_linux(target: &str) { cfg.skip_roundtrip(move |s| match s { // FIXME: "mcontext_t" if s390x => true, - // FIXME: This is actually a union. - "fpreg_t" if s390x => true, // The test doesn't work on some env: "ipv6_mreq" diff --git a/src/unix/linux_like/linux/gnu/b64/s390x.rs b/src/unix/linux_like/linux/gnu/b64/s390x.rs index 4c31252fbad30..c539c2b0d338b 100644 --- a/src/unix/linux_like/linux/gnu/b64/s390x.rs +++ b/src/unix/linux_like/linux/gnu/b64/s390x.rs @@ -212,33 +212,17 @@ s! { } s_no_extra_traits! { - // FIXME: This is actually a union. - pub struct fpreg_t { + pub union fpreg_t { pub d: ::c_double, - // f: ::c_float, + pub f: ::c_float, } } cfg_if! { if #[cfg(feature = "extra_traits")] { - impl PartialEq for fpreg_t { - fn eq(&self, other: &fpreg_t) -> bool { - self.d == other.d - } - } - - impl Eq for fpreg_t {} - impl ::fmt::Debug for fpreg_t { fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { - f.debug_struct("fpreg_t").field("d", &self.d).finish() - } - } - - impl ::hash::Hash for fpreg_t { - fn hash(&self, state: &mut H) { - let d: u64 = unsafe { ::mem::transmute(self.d) }; - d.hash(state); + f.finish_non_exhaustive() } } }