Support redox target os with unix target family

This commit is contained in:
Jeremy Soller 2019-04-21 16:57:34 -06:00
parent 5992932c65
commit a69af17888
No known key found for this signature in database
GPG Key ID: E988B49EE78A7FB1
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "termion" name = "termion"
version = "1.5.1" version = "1.5.2"
authors = ["ticki <Ticki@users.noreply.github.com>", "gycos <alexandre.bury@gmail.com>", "IGI-111 <igi-111@protonmail.com>"] authors = ["ticki <Ticki@users.noreply.github.com>", "gycos <alexandre.bury@gmail.com>", "IGI-111 <igi-111@protonmail.com>"]
description = "A bindless library for manipulating terminals." description = "A bindless library for manipulating terminals."
repository = "https://gitlab.redox-os.org/redox-os/termion" repository = "https://gitlab.redox-os.org/redox-os/termion"

View File

@ -17,7 +17,7 @@ extern crate numtoa;
#[path="sys/redox/mod.rs"] #[path="sys/redox/mod.rs"]
mod sys; mod sys;
#[cfg(unix)] #[cfg(all(unix, not(target_os = "redox")))]
#[path="sys/unix/mod.rs"] #[path="sys/unix/mod.rs"]
mod sys; mod sys;

View File

@ -5,7 +5,7 @@ use super::syscall;
/// Is this stream a TTY? /// Is this stream a TTY?
pub fn is_tty<T: AsRawFd>(stream: &T) -> bool { pub fn is_tty<T: AsRawFd>(stream: &T) -> bool {
if let Ok(fd) = syscall::dup(stream.as_raw_fd(), b"termios") { if let Ok(fd) = syscall::dup(stream.as_raw_fd() as _, b"termios") {
let _ = syscall::close(fd); let _ = syscall::close(fd);
true true
} else { } else {