Skip to content

Commit 2cf8848

Browse files
committed
Make fpreg_t an union
1 parent 7173d20 commit 2cf8848

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

libc-test/build.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4811,8 +4811,6 @@ fn test_linux(target: &str) {
48114811
cfg.skip_roundtrip(move |s| match s {
48124812
// FIXME(1.0):
48134813
"mcontext_t" if s390x => true,
4814-
// FIXME(union): This is actually a union.
4815-
"fpreg_t" if s390x => true,
48164814

48174815
// The test doesn't work on some env:
48184816
"ipv6_mreq"

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,18 +212,17 @@ s! {
212212
}
213213

214214
s_no_extra_traits! {
215-
// FIXME(union): This is actually a union.
216-
pub struct fpreg_t {
215+
pub union fpreg_t {
217216
pub d: c_double,
218-
// f: c_float,
217+
pub f: c_float,
219218
}
220219
}
221220

222221
cfg_if! {
223222
if #[cfg(feature = "extra_traits")] {
224223
impl PartialEq for fpreg_t {
225224
fn eq(&self, other: &fpreg_t) -> bool {
226-
self.d == other.d
225+
unimplemented!("traits")
227226
}
228227
}
229228

0 commit comments

Comments
 (0)