Add cfsetispeed and cfsetospeed stubs for redox
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user