forked from Rust-related/RustPython
Fix openpty on Redox
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user