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();