From b2dd1f89506c988a66d448680ce3381ebae00ac9 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 14 Sep 2021 20:56:35 -0600 Subject: [PATCH] Add cfsetispeed and cfsetospeed stubs for redox --- src/header/termios/mod.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/header/termios/mod.rs b/src/header/termios/mod.rs index afe73a613a..bed8020379 100644 --- a/src/header/termios/mod.rs +++ b/src/header/termios/mod.rs @@ -114,6 +114,14 @@ pub unsafe extern "C" fn cfsetispeed(termios_p: *mut termios, speed: speed_t) -> } } +#[cfg(target_os = "redox")] +#[no_mangle] +pub unsafe extern "C" fn cfsetispeed(termios_p: *mut termios, speed: speed_t) -> c_int { + //TODO + platform::errno = errno::EINVAL; + -1 +} + #[cfg(target_os = "linux")] #[no_mangle] pub unsafe extern "C" fn cfsetospeed(termios_p: *mut termios, speed: speed_t) -> c_int { @@ -129,6 +137,14 @@ pub unsafe extern "C" fn cfsetospeed(termios_p: *mut termios, speed: speed_t) -> } } +#[cfg(target_os = "redox")] +#[no_mangle] +pub unsafe extern "C" fn cfsetospeed(termios_p: *mut termios, speed: speed_t) -> c_int { + //TODO + platform::errno = errno::EINVAL; + -1 +} + #[no_mangle] pub unsafe extern "C" fn tcflush(fd: c_int, queue: c_int) -> c_int { sys_ioctl::ioctl(fd, sys_ioctl::TCFLSH, queue as *mut c_void)