| ... | @@ -3239,7 +3239,18 @@ const common_linux_Sigaction = extern struct { | ... | @@ -3239,7 +3239,18 @@ const common_linux_Sigaction = extern struct { |
| 3239 | | 3239 | |
| 3240 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with function name. | 3240 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with function name. |
| 3241 | pub const Sigaction = switch (native_os) { | 3241 | pub const Sigaction = switch (native_os) { |
| 3242 | .linux => switch (native_arch) { | 3242 | .linux => if (builtin.abi.isAndroid() and builtin.target.ptrBitWidth() == 64) extern struct { |
| | 3243 | pub const handler_fn = *align(1) const fn (SIG) callconv(.c) void; |
| | 3244 | pub const sigaction_fn = *const fn (SIG, *const siginfo_t, ?*anyopaque) callconv(.c) void; |
| | 3245 | |
| | 3246 | flags: c_uint, |
| | 3247 | handler: extern union { |
| | 3248 | handler: ?handler_fn, |
| | 3249 | sigaction: ?sigaction_fn, |
| | 3250 | }, |
| | 3251 | mask: sigset_t, |
| | 3252 | restorer: ?*const fn () callconv(.c) void = null, |
| | 3253 | } else switch (native_arch) { |
| 3243 | .mips, | 3254 | .mips, |
| 3244 | .mipsel, | 3255 | .mipsel, |
| 3245 | .mips64, | 3256 | .mips64, |
| ... | @@ -4877,7 +4888,8 @@ pub const siginfo_t = switch (native_os) { | ... | @@ -4877,7 +4888,8 @@ pub const siginfo_t = switch (native_os) { |
| 4877 | else => void, | 4888 | else => void, |
| 4878 | }; | 4889 | }; |
| 4879 | pub const sigset_t = switch (native_os) { | 4890 | pub const sigset_t = switch (native_os) { |
| 4880 | .linux => [1024 / @bitSizeOf(c_ulong)]c_ulong, // glibc and musl present a 1024-bit sigset_t, while kernel's is 128-bit or less. | 4891 | // glibc and musl present a 1024-bit sigset_t, while kernel's (and bionic's) is 128-bit or less. |
| | 4892 | .linux => if (builtin.abi.isAndroid()) c_ulong else [1024 / @bitSizeOf(c_ulong)]c_ulong, |
| 4881 | .emscripten => emscripten.sigset_t, | 4893 | .emscripten => emscripten.sigset_t, |
| 4882 | // https://github.com/SerenityOS/serenity/blob/ec492a1a0819e6239ea44156825c4ee7234ca3db/Kernel/API/POSIX/signal.h#L19 | 4894 | // https://github.com/SerenityOS/serenity/blob/ec492a1a0819e6239ea44156825c4ee7234ca3db/Kernel/API/POSIX/signal.h#L19 |
| 4883 | .openbsd, .serenity => u32, | 4895 | .openbsd, .serenity => u32, |