From 585727682abf6d928e8110bab0d249b23c7d8c9b Mon Sep 17 00:00:00 2001 From: mochalins <117967760+mochalins@users.noreply.github.com> Date: Tue, 24 Sep 2024 00:53:29 +0900 Subject: [PATCH] fix: macos backend C termios missing `ptrCast`s --- src/backend/macos.zig | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/backend/macos.zig b/src/backend/macos.zig index 3d5d574..3304c58 100644 --- a/src/backend/macos.zig +++ b/src/backend/macos.zig @@ -21,19 +21,25 @@ pub fn configure( var settings = try std.posix.tcgetattr(port.handle); const orig_termios = settings; - c.cfmakeraw(&settings); + c.cfmakeraw(@ptrCast(&settings)); if (config.input_baud_rate) |ibr| { - switch (std.posix.errno(c.cfsetospeed(&settings, config.baud_rate))) { + switch (std.posix.errno( + c.cfsetospeed(@ptrCast(&settings), config.baud_rate), + )) { .SUCCESS => {}, else => |err| std.posix.unexpectedErrno(err), } - switch (std.posix.errno(c.cfsetispeed(&settings, ibr))) { + switch (std.posix.errno( + c.cfsetispeed(@ptrCast(&settings), ibr), + )) { .SUCCESS => {}, else => |err| std.posix.unexpectedErrno(err), } } else { - switch (std.posix.errno(c.cfsetspeed(&settings, config.baud_rate))) { + switch (std.posix.errno( + c.cfsetspeed(@ptrCast(&settings), config.baud_rate), + )) { .SUCCESS => {}, else => |err| std.posix.unexpectedErrno(err), }