Skip to content

Commit 675c185

Browse files
committed
fix: mac test
1 parent 8f87223 commit 675c185

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

build.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ pub fn build(b: *std.Build) void {
2727
.linkage = .static,
2828
.name = "zig_openpty",
2929
.root_module = lib_mod,
30+
.version = std.SemanticVersion.parse("0.1.0") catch null,
3031
});
3132

3233
b.installArtifact(lib);

src/openpty.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub fn openpty(
4141
linux.ioctl(master_fd, pi.TIOCGPTPEER, pi.O_RDWR | pi.O_NOCTTY),
4242
)),
4343
),
44-
.macos => try posix.open(name_slice, pi.O_RDWR | pi.O_NOCTTY, 0),
44+
.macos => try posix.open(name_slice, @bitCast(@as(u32, pi.O_RDWR | pi.O_NOCTTY)), 0),
4545
else => {},
4646
};
4747

src/unlockpt.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn unlockpt(fd: posix.fd_t) IoCtlError!void {
1111
var unlock: u32 = 0;
1212
const arg = switch (builtin.os.tag) {
1313
.linux => pictl.TIOCSPTLCK,
14-
.macos => posix.TIOCPTYUNLK,
14+
.macos => pictl.TIOCPTYUNLK,
1515
else => @compileError("Unsupported os"),
1616
};
1717

0 commit comments

Comments
 (0)