Updates for Zig 0.12 release
1 files changed, 7 insertions(+), 7 deletions(-)

M src/mem.zig
M src/mem.zig +7 -7
@@ 150,23 150,23 @@ test "sodium allocator" {
 // The above copyright notice and this permission notice shall be
 // included in all copies or substantial portions of the Software.
 fn expectIllegalBehavior(context: anytype, comptime func: anytype) !void {
-    if (!@hasDecl(std.os.system, "fork") or !std.debug.runtime_safety) return;
+    if (!@hasDecl(std.posix, "fork") or !std.debug.runtime_safety) return;
 
-    const child_pid = try std.os.fork();
+    const child_pid = try std.posix.fork();
     if (child_pid == 0) {
         const null_fd = std.posix.openZ("/dev/null", .{.ACCMODE=.RDWR}, 0) catch {
             std.debug.print("Cannot open /dev/null\n", .{});
-            std.os.exit(0);
+            std.process.exit(0);
         };
-        std.os.dup2(null_fd, std.io.getStdErr().handle) catch {
+        std.posix.dup2(null_fd, std.io.getStdErr().handle) catch {
             std.debug.print("Cannot close child process stderr\n", .{});
-            std.os.exit(0);
+            std.process.exit(0);
         };
 
         func(context); // this should crash
-        std.os.exit(0);
+        std.process.exit(0);
     } else {
-        const status = std.os.waitpid(child_pid, 0).status;
+        const status = std.posix.waitpid(child_pid, 0).status;
         // Maybe we should use a fixed error code instead of checking
         // status != 0
         if (status == 0)