Skip to content

Commit 82bf1d8

Browse files
committed
linux-musl-s390x: Make fpreg_t a union
Previously, the definition was only changed for glibc but not for musl. Fixes: 051fa61 ("Make `fpreg_t` an union")
1 parent 1c0aeaa commit 82bf1d8

File tree

1 file changed

+6
-8
lines changed
  • src/unix/linux_like/linux/musl/b64

1 file changed

+6
-8
lines changed

src/unix/linux_like/linux/musl/b64/s390x.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,27 +87,25 @@ s! {
8787
}
8888

8989
s_no_extra_traits! {
90-
// FIXME(union): This is actually a union.
91-
pub struct fpreg_t {
90+
pub union fpreg_t {
9291
pub d: c_double,
93-
// f: c_float,
92+
pub f: c_float,
9493
}
9594
}
9695

9796
cfg_if! {
9897
if #[cfg(feature = "extra_traits")] {
9998
impl PartialEq for fpreg_t {
100-
fn eq(&self, other: &fpreg_t) -> bool {
101-
self.d == other.d
99+
fn eq(&self, _other: &fpreg_t) -> bool {
100+
unimplemented!("traits")
102101
}
103102
}
104103

105104
impl Eq for fpreg_t {}
106105

107106
impl hash::Hash for fpreg_t {
108-
fn hash<H: hash::Hasher>(&self, state: &mut H) {
109-
let d: u64 = self.d.to_bits();
110-
d.hash(state);
107+
fn hash<H: hash::Hasher>(&self, _state: &mut H) {
108+
unimplemented!("traits")
111109
}
112110
}
113111
}

0 commit comments

Comments
 (0)