aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorSébastien Marie <semarie@online.fr>2022-08-23 10:29:46 +0000
committerIsaac Freund <mail@isaacfreund.com>2022-08-26 17:30:07 +0200
commit8bcb962ada2ea5cfeeff303e1063937ee13af6ad (patch)
treebf8d9b179ddec0e6c6542e95a18289d610951c6b /lib/std
parent2e0ff6c700f1ca35c37bff8c3b0f4b8cc6e7766c (diff)
downloadzig-8bcb962ada2ea5cfeeff303e1063937ee13af6ad.tar.gz
zig-8bcb962ada2ea5cfeeff303e1063937ee13af6ad.zip
openbsd: fix sigcontext struct and avoid defining fxsave64
`sc_fpstate` member of `struct sigcontext` is a `struct fxsave64 *`. use *anyopaque to represent it. avoid to defining `fxsave64` as it is a packed struct with some arrays.
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/c/openbsd.zig17
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/std/c/openbsd.zig b/lib/std/c/openbsd.zig
index 5c259bc41a..ddcb24ffd3 100644
--- a/lib/std/c/openbsd.zig
+++ b/lib/std/c/openbsd.zig
@@ -1119,26 +1119,11 @@ pub usingnamespace switch (builtin.cpu.arch) {
sc_rsp: c_long,
sc_ss: c_long,
- sc_fpstate: fxsave64,
+ sc_fpstate: *anyopaque, // struct fxsave64 *
__sc_unused: c_int,
sc_mask: c_int,
sc_cookie: c_long,
};
-
- pub const fxsave64 = packed struct {
- fx_fcw: u16,
- fx_fsw: u16,
- fx_ftw: u8,
- fx_unused1: u8,
- fx_fop: u16,
- fx_rip: u64,
- fx_rdp: u64,
- fx_mxcsr: u32,
- fx_mxcsr_mask: u32,
- fx_st: [8][2]u64,
- fx_xmm: [16][2]u64,
- fx_unused3: [96]u8,
- };
},
else => struct {},
};