Fix openpty on Redox

This commit is contained in:
coolreader18
2019-08-04 15:46:07 -05:00
parent 77b34c9b95
commit fd39a830c4

View File

@@ -8,7 +8,7 @@ use std::{env, fs};
#[cfg(unix)]
use nix::errno::Errno;
#[cfg(unix)]
#[cfg(all(unix, not(target_os = "redox")))]
use nix::pty::openpty;
#[cfg(unix)]
use nix::unistd::{self, Gid, Pid, Uid};
@@ -853,7 +853,7 @@ fn os_seteuid(euid: PyIntRef, vm: &VirtualMachine) -> PyResult<()> {
unistd::seteuid(Uid::from_raw(euid)).map_err(|err| convert_nix_error(vm, err))
}
#[cfg(unix)]
#[cfg(all(unix, not(target_os = "redox")))]
pub fn os_openpty(vm: &VirtualMachine) -> PyResult {
match openpty(None, None) {
Ok(r) => Ok(vm