authorgravatar for michael.dusan@gmail.comMichael Dusan <michael.dusan@gmail.com> 2024-03-20 11:45:41-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-03-20 14:06:35-07:00
loge4ed63f1384902f5662b66203ebb3415e0cbfdb2
tree01157cde7a3ec3cf8bb5fb8d6183690a73a33534
parent5005c6243a37f7fc9f23dae298b0dafa085fa044

bsd: followup to std.posix extraction from std.os

netbsd fix: - `Futex.zig:542:56: error: expected error union type, found 'c_int'` openbsd fix: - `emutls.zig:10:21: error: root struct of file 'os' has no member named 'abort'` - `Thread.zig:627:22: error: expected 6 argument(s), found 5`

3 files changed, 3 insertions(+), 3 deletions(-)

lib/compiler_rt/emutls.zig+1-1
......@@ -7,7 +7,7 @@ const std = @import("std");
77const builtin = @import("builtin");
88const common = @import("common.zig");
99
10const abort = std.os.abort;
10const abort = std.posix.abort;
1111const assert = std.debug.assert;
1212const expect = std.testing.expect;
1313
lib/std/Thread.zig+1-1
......@@ -624,7 +624,7 @@ const PosixThreadImpl = struct {
624624 var count: c_int = undefined;
625625 var count_size: usize = @sizeOf(c_int);
626626 const mib = [_]c_int{ std.c.CTL.HW, std.c.HW.NCPUONLINE };
627 std.c.sysctl(&mib, &count, &count_size, null, 0) catch |err| switch (err) {
627 posix.sysctl(&mib, &count, &count_size, null, 0) catch |err| switch (err) {
628628 error.NameTooLong, error.UnknownName => unreachable,
629629 else => |e| return e,
630630 };
lib/std/Thread/Futex.zig+1-1
......@@ -539,7 +539,7 @@ const PosixImpl = struct {
539539 // This can be changed with pthread_condattr_setclock, but it's an extension and may not be available everywhere.
540540 var ts: c.timespec = undefined;
541541 if (timeout) |timeout_ns| {
542 c.clock_gettime(c.CLOCK.REALTIME, &ts) catch unreachable;
542 std.posix.clock_gettime(c.CLOCK.REALTIME, &ts) catch unreachable;
543543 ts.tv_sec +|= @as(@TypeOf(ts.tv_sec), @intCast(timeout_ns / std.time.ns_per_s));
544544 ts.tv_nsec += @as(@TypeOf(ts.tv_nsec), @intCast(timeout_ns % std.time.ns_per_s));
545545