Skip to content

Commit

Permalink
update to not macos instead of linux (unlocks freeBSD) REF: #115
Browse files Browse the repository at this point in the history
  • Loading branch information
raphamorim committed Jul 3, 2023
1 parent c95c985 commit 014031c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions teletypewriter/src/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use std::process::Command;
use std::ptr;
use std::sync::Arc;

#[cfg(target_os = "linux")]
#[cfg(not(target_os = "macos"))]
const TIOCSWINSZ: libc::c_ulong = 0x5414;
#[cfg(target_os = "macos")]
const TIOCSWINSZ: libc::c_ulong = 2148037735;
Expand Down Expand Up @@ -244,7 +244,7 @@ pub fn terminfo_exists(terminfo: &str) -> bool {
}

pub fn create_termp(utf8: bool) -> libc::termios {
#[cfg(target_os = "linux")]
#[cfg(not(target_os = "macos"))]
let mut term = libc::termios {
c_iflag: libc::ICRNL | libc::IXON | libc::IXANY | libc::IMAXBEL | libc::BRKINT,
c_oflag: libc::OPOST | libc::ONLCR,
Expand Down

0 comments on commit 014031c

Please sign in to comment.