fix x86_64-linux-gnu build
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
a433937d39
commit
b7fb2057f7
3 changed files with 5 additions and 2 deletions
|
|
@ -279,6 +279,9 @@ pub fn build(b: *std.Build) !void {
|
||||||
}
|
}
|
||||||
addPaths(&unit_tests.root_module);
|
addPaths(&unit_tests.root_module);
|
||||||
|
|
||||||
|
// Linux gamemode requires libc.
|
||||||
|
if (target.result.os.tag == .linux) unit_tests.root_module.link_libc = true;
|
||||||
|
|
||||||
// Exposes a `test` step to the `zig build --help` menu, providing a way for the user to
|
// Exposes a `test` step to the `zig build --help` menu, providing a way for the user to
|
||||||
// request running the unit tests.
|
// request running the unit tests.
|
||||||
const run_unit_tests = b.addRunArtifact(unit_tests);
|
const run_unit_tests = b.addRunArtifact(unit_tests);
|
||||||
|
|
|
||||||
|
|
@ -1317,7 +1317,7 @@ fn detectBackendType(allocator: std.mem.Allocator) !gpu.BackendType {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Check if gamemode should be activated
|
/// Check if gamemode should be activated
|
||||||
fn wantGamemode(allocator: std.mem.Allocator) error{ OutOfMemory, InvalidUtf8 }!bool {
|
fn wantGamemode(allocator: std.mem.Allocator) error{ OutOfMemory, InvalidUtf8, InvalidWtf8 }!bool {
|
||||||
const use_gamemode = std.process.getEnvVarOwned(
|
const use_gamemode = std.process.getEnvVarOwned(
|
||||||
allocator,
|
allocator,
|
||||||
"MACH_USE_GAMEMODE",
|
"MACH_USE_GAMEMODE",
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ pub const Context = struct {
|
||||||
};
|
};
|
||||||
errdefer std.os.inotify_rm_watch(notify_fd, notify_wd);
|
errdefer std.os.inotify_rm_watch(notify_fd, notify_wd);
|
||||||
|
|
||||||
const notify_pipe_fd = std.os.pipe2(std.os.O.NONBLOCK) catch |err| switch (err) {
|
const notify_pipe_fd = std.os.pipe2(.{ .NONBLOCK = true }) catch |err| switch (err) {
|
||||||
error.ProcessFdQuotaExceeded,
|
error.ProcessFdQuotaExceeded,
|
||||||
error.SystemFdQuotaExceeded,
|
error.SystemFdQuotaExceeded,
|
||||||
=> return error.SystemResources,
|
=> return error.SystemResources,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue