From 9f52a963f5dd78e0f79e13c7d17faf68e610d752 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 16 Aug 2024 10:37:31 -0700 Subject: [PATCH] pty: remove usingns --- src/pty.zig | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/pty.zig b/src/pty.zig index c5c207b54..0bb1aff67 100644 --- a/src/pty.zig +++ b/src/pty.zig @@ -63,17 +63,15 @@ const PosixPty = struct { const TIOCSWINSZ = if (builtin.os.tag == .macos) 2148037735 else c.TIOCSWINSZ; const TIOCGWINSZ = if (builtin.os.tag == .macos) 1074295912 else c.TIOCGWINSZ; extern "c" fn setsid() std.c.pid_t; - const c = struct { - usingnamespace switch (builtin.os.tag) { - .macos => @cImport({ - @cInclude("sys/ioctl.h"); // ioctl and constants - @cInclude("util.h"); // openpty() - }), - else => @cImport({ - @cInclude("sys/ioctl.h"); // ioctl and constants - @cInclude("pty.h"); - }), - }; + const c = switch (builtin.os.tag) { + .macos => @cImport({ + @cInclude("sys/ioctl.h"); // ioctl and constants + @cInclude("util.h"); // openpty() + }), + else => @cImport({ + @cInclude("sys/ioctl.h"); // ioctl and constants + @cInclude("pty.h"); + }), }; /// The file descriptors for the master and slave side of the pty.