fix(jerboa-native-rs): use c_char (not i8) for /dev/tty open() path
ober
be6328ed615d7c28e28707ae544abdb7f94283e1
--- a/jerboa-native-rs/src/embed_crypto.rs +++ b/jerboa-native-rs/src/embed_crypto.rs @@ -180,8 +180,8 @@ pub extern "C" fn embed_read_passphrase( buf: *mut u8, buflen: i32, ) -> i32 { - use libc::{c_int, c_void, close, open, read, tcgetattr, tcsetattr, termios, write, ECHO, - EINTR, O_RDWR, TCSANOW}; + use libc::{c_char, c_int, c_void, close, open, read, tcgetattr, tcsetattr, termios, write, + ECHO, EINTR, O_RDWR, TCSANOW}; fn last_errno() -> i32 { std::io::Error::last_os_error().raw_os_error().unwrap_or(0) } @@ -189,7 +189,7 @@ pub extern "C" fn embed_read_passphrase( return -1; } unsafe { - let path = b"/dev/tty\0".as_ptr() as *const i8; + let path = b"/dev/tty\0".as_ptr() as *const c_char; let fd: c_int = open(path, O_RDWR); if fd < 0 { return -1;