aboutsummaryrefslogtreecommitdiff
path: root/src/tty.rs
diff options
context:
space:
mode:
authorjohalun <johalun0@gmail.com>2017-01-12 13:16:09 -0800
committerJoe Wilm <jwilm@users.noreply.github.com>2017-01-18 22:28:16 -0800
commit398e31fa3789f0574a6ff679742dfb7639984e12 (patch)
tree534eac678766a748c6b3543da8ba448c3018ea24 /src/tty.rs
parenta2cd4b647c1058c3012348774481ade30dddd601 (diff)
downloadalacritty-398e31fa3789f0574a6ff679742dfb7639984e12.tar.gz
alacritty-398e31fa3789f0574a6ff679742dfb7639984e12.zip
Make it run on FreeBSD
Diffstat (limited to 'src/tty.rs')
-rw-r--r--src/tty.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tty.rs b/src/tty.rs
index c9feae36..0f885d52 100644
--- a/src/tty.rs
+++ b/src/tty.rs
@@ -20,7 +20,7 @@ use std::fs::File;
use std::os::unix::io::FromRawFd;
use std::ptr;
-use libc::{self, winsize, c_int, pid_t, WNOHANG, WIFEXITED, WEXITSTATUS, SIGCHLD};
+use libc::{self, winsize, c_int, pid_t, WNOHANG, WIFEXITED, WEXITSTATUS, SIGCHLD, TIOCSCTTY};
use term::SizeInfo;
use display::OnResize;
@@ -112,7 +112,7 @@ fn openpty(rows: u8, cols: u8) -> (c_int, c_int) {
(master, slave)
}
-#[cfg(target_os = "macos")]
+#[cfg(any(target_os = "macos",target_os = "freebsd"))]
fn openpty(rows: u8, cols: u8) -> (c_int, c_int) {
let mut master: c_int = 0;
let mut slave: c_int = 0;
@@ -138,7 +138,7 @@ fn openpty(rows: u8, cols: u8) -> (c_int, c_int) {
/// Really only needed on BSD, but should be fine elsewhere
fn set_controlling_terminal(fd: c_int) {
let res = unsafe {
- libc::ioctl(fd, libc::TIOCSCTTY as _, 0)
+ libc::ioctl(fd, TIOCSCTTY as _, 0)
};
if res < 0 {