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.
1 files changed, 1 insertions(+), 16 deletions(-)
lib/std/c/openbsd.zig+1-16
| ... | ... | @@ -1119,26 +1119,11 @@ pub usingnamespace switch (builtin.cpu.arch) { |
| 1119 | 1119 | sc_rsp: c_long, |
| 1120 | 1120 | sc_ss: c_long, |
| 1121 | 1121 | |
| 1122 | | sc_fpstate: fxsave64, |
| 1122 | sc_fpstate: *anyopaque, // struct fxsave64 * |
| 1123 | 1123 | __sc_unused: c_int, |
| 1124 | 1124 | sc_mask: c_int, |
| 1125 | 1125 | sc_cookie: c_long, |
| 1126 | 1126 | }; |
| 1127 | | |
| 1128 | | pub const fxsave64 = packed struct { |
| 1129 | | fx_fcw: u16, |
| 1130 | | fx_fsw: u16, |
| 1131 | | fx_ftw: u8, |
| 1132 | | fx_unused1: u8, |
| 1133 | | fx_fop: u16, |
| 1134 | | fx_rip: u64, |
| 1135 | | fx_rdp: u64, |
| 1136 | | fx_mxcsr: u32, |
| 1137 | | fx_mxcsr_mask: u32, |
| 1138 | | fx_st: [8][2]u64, |
| 1139 | | fx_xmm: [16][2]u64, |
| 1140 | | fx_unused3: [96]u8, |
| 1141 | | }; |
| 1142 | 1127 | }, |
| 1143 | 1128 | else => struct {}, |
| 1144 | 1129 | }; |