Skip to content

Commit

Permalink
unix_term: conditionally use std::ptr for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Funami580 committed Feb 6, 2024
1 parent 5d0d3ea commit bbd9e2c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/unix_term.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -122,6 +121,8 @@ fn poll_fd(fd: i32, timeout: i32) -> io::Result<bool> {

#[cfg(target_os = "macos")]
fn select_fd(fd: i32, timeout: i32) -> io::Result<bool> {
use std::ptr;

unsafe {
let mut read_fd_set: libc::fd_set = mem::zeroed();

Expand Down

0 comments on commit bbd9e2c

Please sign in to comment.