| ... | ... | @@ -2722,7 +2722,39 @@ pub const SYS = switch (native_os) { |
| 2722 | 2722 | }; |
| 2723 | 2723 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with function name. |
| 2724 | 2724 | pub const Sigaction = switch (native_os) { |
| 2725 | | .linux => linux.Sigaction, |
| 2725 | .linux => switch (native_arch) { |
| 2726 | .mips, |
| 2727 | .mipsel, |
| 2728 | .mips64, |
| 2729 | .mips64el, |
| 2730 | => if (builtin.target.isMusl()) |
| 2731 | linux.Sigaction |
| 2732 | else if (builtin.target.ptrBitWidth() == 64) extern struct { |
| 2733 | pub const handler_fn = *align(1) const fn (i32) callconv(.C) void; |
| 2734 | pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.C) void; |
| 2735 | |
| 2736 | flags: c_uint, |
| 2737 | handler: extern union { |
| 2738 | handler: ?handler_fn, |
| 2739 | sigaction: ?sigaction_fn, |
| 2740 | }, |
| 2741 | mask: sigset_t, |
| 2742 | restorer: ?*const fn () callconv(.C) void = null, |
| 2743 | } else extern struct { |
| 2744 | pub const handler_fn = *align(1) const fn (i32) callconv(.C) void; |
| 2745 | pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.C) void; |
| 2746 | |
| 2747 | flags: c_uint, |
| 2748 | handler: extern union { |
| 2749 | handler: ?handler_fn, |
| 2750 | sigaction: ?sigaction_fn, |
| 2751 | }, |
| 2752 | mask: sigset_t, |
| 2753 | restorer: ?*const fn () callconv(.C) void = null, |
| 2754 | __resv: [1]c_int = .{0}, |
| 2755 | }, |
| 2756 | else => linux.Sigaction, |
| 2757 | }, |
| 2726 | 2758 | .emscripten => emscripten.Sigaction, |
| 2727 | 2759 | .netbsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct { |
| 2728 | 2760 | pub const handler_fn = *align(1) const fn (i32) callconv(.C) void; |