aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os/bits/linux.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-04-01 10:24:54 -0400
committerGitHub <noreply@github.com>2020-04-01 10:24:54 -0400
commite8a1e2a1d8f2903d5951339f7d3e0dbdfc85704c (patch)
tree41f671fd9924644bb3e3f1bcd771822087a527d0 /lib/std/os/bits/linux.zig
parent0628c2e2bae0a847dee4863521d9e6f4d9383e83 (diff)
parent5047cd3d782c51474216eda92ea457315bc4f8b5 (diff)
downloadzig-e8a1e2a1d8f2903d5951339f7d3e0dbdfc85704c.tar.gz
zig-e8a1e2a1d8f2903d5951339f7d3e0dbdfc85704c.zip
Merge pull request #4894 from LemonBoy/netbsd-p2
More NetBSD bits
Diffstat (limited to 'lib/std/os/bits/linux.zig')
-rw-r--r--lib/std/os/bits/linux.zig14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/std/os/bits/linux.zig b/lib/std/os/bits/linux.zig
index 3a2040b440..4bc3357ce5 100644
--- a/lib/std/os/bits/linux.zig
+++ b/lib/std/os/bits/linux.zig
@@ -813,13 +813,13 @@ pub const app_mask: sigset_t = [2]u32{ 0xfffffffc, 0x7fffffff } ++ [_]u32{0xffff
pub const k_sigaction = if (is_mips)
extern struct {
flags: usize,
- sigaction: ?extern fn (i32, *siginfo_t, *c_void) void,
+ sigaction: ?extern fn (i32, *siginfo_t, ?*c_void) void,
mask: [4]u32,
restorer: extern fn () void,
}
else
extern struct {
- sigaction: ?extern fn (i32, *siginfo_t, *c_void) void,
+ sigaction: ?extern fn (i32, *siginfo_t, ?*c_void) void,
flags: usize,
restorer: extern fn () void,
mask: [2]u32,
@@ -827,15 +827,17 @@ else
/// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall.
pub const Sigaction = extern struct {
- sigaction: ?extern fn (i32, *siginfo_t, *c_void) void,
+ pub const sigaction_fn = fn (i32, *siginfo_t, ?*c_void) callconv(.C) void;
+ sigaction: ?sigaction_fn,
mask: sigset_t,
flags: u32,
restorer: ?extern fn () void = null,
};
-pub const SIG_ERR = @intToPtr(extern fn (i32, *siginfo_t, *c_void) void, maxInt(usize));
-pub const SIG_DFL = @intToPtr(?extern fn (i32, *siginfo_t, *c_void) void, 0);
-pub const SIG_IGN = @intToPtr(extern fn (i32, *siginfo_t, *c_void) void, 1);
+pub const SIG_ERR = @intToPtr(?Sigaction.sigaction_fn, maxInt(usize));
+pub const SIG_DFL = @intToPtr(?Sigaction.sigaction_fn, 0);
+pub const SIG_IGN = @intToPtr(?Sigaction.sigaction_fn, 1);
+
pub const empty_sigset = [_]u32{0} ** sigset_t.len;
pub const in_port_t = u16;