From bbd9e2cf2ff711455ed0e8039e078988a5f9802f Mon Sep 17 00:00:00 2001 From: Funami580 <63090225+Funami580@users.noreply.github.com> Date: Tue, 6 Feb 2024 16:28:44 +0100 Subject: [PATCH] unix_term: conditionally use std::ptr for macOS --- src/unix_term.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix_term.rs b/src/unix_term.rs index 9e1e00b0..ad43be0e 100644 --- a/src/unix_term.rs +++ b/src/unix_term.rs @@ -5,7 +5,6 @@ use std::io; use std::io::{BufRead, BufReader}; use std::mem; use std::os::unix::io::AsRawFd; -use std::ptr; use std::os::unix::io::FromRawFd; use std::os::unix::io::IntoRawFd; use std::str; @@ -122,6 +121,8 @@ fn poll_fd(fd: i32, timeout: i32) -> io::Result { #[cfg(target_os = "macos")] fn select_fd(fd: i32, timeout: i32) -> io::Result { + use std::ptr; + unsafe { let mut read_fd_set: libc::fd_set = mem::zeroed();