Merge pull request #16052 from mikdusan/bsd-getdents

fix bad return types for BSDs getdents and debitrot openbsd
This commit is contained in:
Andrew Kelley
2023-06-17 13:01:52 -07:00
committed by GitHub
7 changed files with 57 additions and 30 deletions

View File

@@ -624,7 +624,7 @@ const PosixThreadImpl = struct {
.openbsd => {
var count: c_int = undefined;
var count_size: usize = @sizeOf(c_int);
const mib = [_]c_int{ os.CTL.HW, os.system.HW_NCPUONLINE };
const mib = [_]c_int{ os.CTL.HW, os.system.HW.NCPUONLINE };
os.sysctl(&mib, &count, &count_size, null, 0) catch |err| switch (err) {
error.NameTooLong, error.UnknownName => unreachable,
else => |e| return e,