diff options
Diffstat (limited to 'src/sys/termios.rs')
-rw-r--r-- | src/sys/termios.rs | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/sys/termios.rs b/src/sys/termios.rs index 8621cf0c..25326b01 100644 --- a/src/sys/termios.rs +++ b/src/sys/termios.rs @@ -366,13 +366,13 @@ libc_enum!{ B1500000, #[cfg(any(target_os = "android", target_os = "linux"))] B2000000, - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))] B2500000, - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))] B3000000, - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))] B3500000, - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))] B4000000, } } @@ -383,8 +383,9 @@ impl From<libc::speed_t> for BaudRate { use libc::{B0, B50, B75, B110, B134, B150, B200, B300, B600, B1200, B1800, B2400, B4800, B9600, B19200, B38400, B57600, B115200, B230400}; #[cfg(any(target_os = "android", target_os = "linux"))] - use libc::{B500000, B576000, B1000000, B1152000, B1500000, B2000000, B2500000, B3000000, - B3500000, B4000000}; + use libc::{B500000, B576000, B1000000, B1152000, B1500000, B2000000}; + #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))] + use libc::{B2500000, B3000000, B3500000, B4000000}; #[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "macos", @@ -463,13 +464,13 @@ impl From<libc::speed_t> for BaudRate { B1500000 => BaudRate::B1500000, #[cfg(any(target_os = "android", target_os = "linux"))] B2000000 => BaudRate::B2000000, - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))] B2500000 => BaudRate::B2500000, - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))] B3000000 => BaudRate::B3000000, - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))] B3500000 => BaudRate::B3500000, - #[cfg(any(target_os = "android", target_os = "linux"))] + #[cfg(any(target_os = "android", all(target_os = "linux", not(target_arch = "sparc64"))))] B4000000 => BaudRate::B4000000, b => unreachable!("Invalid baud constant: {}", b), } |