Skip to content

Commit

Permalink
fix: missing os imports
Browse files Browse the repository at this point in the history
  • Loading branch information
hendriknielaender committed Feb 6, 2024
1 parent fd427b9 commit 19a21b0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions util/platform.zig
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const std = @import("std");
const builtin = @import("builtin");

const unix = @import("os/linux.zig");
const mac = @import("os/osx.zig");
const win = @import("os/windows.zig");

pub const OsInfo = struct {
platform: []const u8,
Expand All @@ -25,7 +27,7 @@ pub fn getSystemInfo(allocator: std.mem.Allocator) !OsInfo {
pub fn linux(allocator: std.mem.Allocator) !OsInfo {
return OsInfo{
.platform = platform,
.cpu = try linux.getCpuName(allocator),
.cpu = try unix.getCpuName(allocator),
.cpu_cores = 1,
.memory_total = 1,
};
Expand All @@ -45,7 +47,7 @@ pub fn windows(allocator: std.mem.Allocator) !OsInfo {
// GetSystemInfo, GlobalMemoryStatusEx, or similar for CPU cores and total memory
return OsInfo{
.platform = platform,
.cpu = try windows.getCpuName(allocator),
.cpu = try win.getCpuName(allocator),
.cpu_cores = 1, // Retrieve CPU cores using GetSystemInfo or similar,
.memory_total = 1, // Retrieve total memory using GlobalMemoryStatusEx or similar,
};
Expand Down

0 comments on commit 19a21b0

Please sign in to comment.