When using ioctl's, be as general as possible.

- On some platforms, the arguments are u32s on others they are u64s,
    use `into` to cover more situations.

  - Fixes #211.
This commit is contained in:
Neal H. Walfield 2024-03-02 19:54:30 +01:00
parent cef91ffbe7
commit 039aa33153
No known key found for this signature in database
GPG Key ID: 6863C9AD5B4D22D3

View File

@ -30,9 +30,9 @@ mod integration {
c.pre_exec(|| {
// Best-effort, ignores errors.
if let Ok(h) = std::fs::File::open("/dev/tty") {
ioctl(h.as_raw_fd(), TIOCNOTTY);
ioctl(h.as_raw_fd(), TIOCNOTTY.into());
} else {
ioctl(std::io::stdin().as_raw_fd(), TIOCNOTTY);
ioctl(std::io::stdin().as_raw_fd(), TIOCNOTTY.into());
}
Ok(())
});