From 3b1f9b476c559cbbf4beb02c8d5028d049110ad5 Mon Sep 17 00:00:00 2001 From: Jared Baur Date: Sat, 20 Apr 2024 13:11:24 -0700 Subject: [PATCH] Fix usage of `unexpectedErrno` `unexpectedErrno` comes from `std.posix`, not `std.os`. --- lib/std/os/linux.zig | 2 +- lib/std/os/linux/bpf.zig | 2 +- lib/std/posix.zig | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig index 69cef35e98..93581b1107 100644 --- a/lib/std/os/linux.zig +++ b/lib/std/os/linux.zig @@ -1893,7 +1893,7 @@ pub fn sched_setaffinity(pid: pid_t, set: *const cpu_set_t) !void { switch (std.os.errno(rc)) { .SUCCESS => return, - else => |err| return std.os.unexpectedErrno(err), + else => |err| return std.posix.unexpectedErrno(err), } } diff --git a/lib/std/os/linux/bpf.zig b/lib/std/os/linux/bpf.zig index 5e02485b15..61c704fce9 100644 --- a/lib/std/os/linux/bpf.zig +++ b/lib/std/os/linux/bpf.zig @@ -1,6 +1,6 @@ const std = @import("../../std.zig"); const errno = linux.E.init; -const unexpectedErrno = std.os.unexpectedErrno; +const unexpectedErrno = std.posix.unexpectedErrno; const expectEqual = std.testing.expectEqual; const expectError = std.testing.expectError; const expect = std.testing.expect; diff --git a/lib/std/posix.zig b/lib/std/posix.zig index 857c8dd1e2..9b6a38eb45 100644 --- a/lib/std/posix.zig +++ b/lib/std/posix.zig @@ -542,7 +542,7 @@ pub fn reboot(cmd: RebootCommand) RebootError!void { ))) { .SUCCESS => {}, .PERM => return error.PermissionDenied, - else => |err| return std.os.unexpectedErrno(err), + else => |err| return std.posix.unexpectedErrno(err), } switch (cmd) { .CAD_OFF => {},