From db8eae65dece402438e5e48dd0d1c8c4fc8f5b1c Mon Sep 17 00:00:00 2001 From: Al Hoang <3811822-hoanga@users.noreply.gitlab.com> Date: Sat, 22 May 2021 00:56:30 -0500 Subject: [PATCH] avoid usage of execv on Haiku --- lib/std/process.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/std/process.zig b/lib/std/process.zig index 8b49e84a8c..f026c640e0 100644 --- a/lib/std/process.zig +++ b/lib/std/process.zig @@ -800,7 +800,10 @@ pub fn getSelfExeSharedLibPaths(allocator: *Allocator) error{OutOfMemory}![][:0] } /// Tells whether calling the `execv` or `execve` functions will be a compile error. -pub const can_execv = std.builtin.os.tag != .windows; +pub const can_execv = switch (builtin.os.tag) { + .windows, .haiku => false, + else => true, +}; pub const ExecvError = std.os.ExecveError || error{OutOfMemory};