diff --git a/src/sys.rs b/src/sys.rs index 2d0d062..a1f4c67 100644 --- a/src/sys.rs +++ b/src/sys.rs @@ -33,7 +33,9 @@ impl Pty { Ok(Pts(std::fs::OpenOptions::new() .read(true) .write(true) - .custom_flags(libc::O_NOCTTY) + .custom_flags( + rustix::fs::OFlags::NOCTTY.bits().try_into().unwrap(), + ) .open(std::ffi::OsStr::from_bytes( rustix::pty::ptsname(&self.0, vec![])?.as_bytes(), ))?