authorgravatar for jaredbaur@fastmail.comJared Baur <jaredbaur@fastmail.com> 2024-04-20 13:11:24-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-04-20 19:37:41-07:00
logc352845e888870172c88900144e243b3c1eed010
tree2ae964f23981d347fdb1202e3d2d91905ddc8e30
parent40118c769f146664574d8ce9af9aadcdd8c1799d

Fix usage of `unexpectedErrno`

`unexpectedErrno` comes from `std.posix`, not `std.os`.

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

lib/std/os/linux.zig+1-1
......@@ -1893,7 +1893,7 @@ pub fn sched_setaffinity(pid: pid_t, set: *const cpu_set_t) !void {
18931893
18941894 switch (std.os.errno(rc)) {
18951895 .SUCCESS => return,
1896 else => |err| return std.os.unexpectedErrno(err),
1896 else => |err| return std.posix.unexpectedErrno(err),
18971897 }
18981898}
18991899
lib/std/os/linux/bpf.zig+1-1
......@@ -1,6 +1,6 @@
11const std = @import("../../std.zig");
22const errno = linux.E.init;
3const unexpectedErrno = std.os.unexpectedErrno;
3const unexpectedErrno = std.posix.unexpectedErrno;
44const expectEqual = std.testing.expectEqual;
55const expectError = std.testing.expectError;
66const expect = std.testing.expect;
lib/std/posix.zig+1-1
......@@ -542,7 +542,7 @@ pub fn reboot(cmd: RebootCommand) RebootError!void {
542542 ))) {
543543 .SUCCESS => {},
544544 .PERM => return error.PermissionDenied,
545 else => |err| return std.os.unexpectedErrno(err),
545 else => |err| return std.posix.unexpectedErrno(err),
546546 }
547547 switch (cmd) {
548548 .CAD_OFF => {},