diff --git a/build.zig b/build.zig index 85e6b1a..4fb6eaa 100644 --- a/build.zig +++ b/build.zig @@ -5,7 +5,7 @@ pub fn build(b: *std.Build) !void { const target = b.standardTargetOptions(.{}); if (target.result.os.tag == .windows) { std.log.err("\x1b[31mPlatform Not Supported\x1b[0m\nCurrently, Facil.io and Zap are not compatible with Windows. Consider using Linux or Windows Subsystem for Linux (WSL) instead.\nFor more information, please see:\n- https://github.com/zigzap/zap#most-faq\n- https://facil.io/#forking-contributing-and-all-that-jazz\n", .{}); - std.os.exit(1); + std.process.exit(1); } // Standard release options allow the person running `zig build` to select // between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. @@ -13,7 +13,7 @@ pub fn build(b: *std.Build) !void { const use_openssl = b.option(bool, "openssl", "Use system-installed openssl for TLS support in zap") orelse blk: { // Alternatively, use an os env var to determine whether to build openssl support - if (std.os.getenv("ZAP_USE_OPENSSL")) |val| { + if (std.posix.getenv("ZAP_USE_OPENSSL")) |val| { if (std.mem.eql(u8, val, "true")) break :blk true; } break :blk false; diff --git a/examples/https/https.zig b/examples/https/https.zig index 88c53a7..aeb7930 100644 --- a/examples/https/https.zig +++ b/examples/https/https.zig @@ -30,7 +30,7 @@ fn help_and_exit(filename: []const u8, err: anyerror) void { , .{ filename, err }, ); - std.os.exit(1); + std.process.exit(1); } pub fn main() !void { const CERT_FILE = "mycert.pem"; diff --git a/tools/announceybot.zig b/tools/announceybot.zig index 071085e..2b7e835 100644 --- a/tools/announceybot.zig +++ b/tools/announceybot.zig @@ -28,7 +28,7 @@ fn usage() void { \\ instructions ; std.debug.print("{s}", .{message}); - std.os.exit(1); + std.process.exit(1); } var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){}; @@ -336,7 +336,7 @@ fn command_announce(allocator: std.mem.Allocator, tag: []const u8) !void { defer allocator.free(url); sendToDiscord(allocator, url, announcement) catch |err| { std.debug.print("HTTP ERROR: {any}\n", .{err}); - std.os.exit(1); + std.process.exit(1); }; }