diff options
author | Bryant Mairs <bryant@mai.rs> | 2018-12-01 07:34:33 -0800 |
---|---|---|
committer | Bryant Mairs <bryant@mai.rs> | 2018-12-01 07:46:09 -0800 |
commit | 18097cbd2e5d3e78c30c9cab807e53a16ca57531 (patch) | |
tree | 79dea58a99656dea7908e54565abc0b433350983 /src/sys/termios.rs | |
parent | 2f6196c11bd80cad75b0afe7676c376ae548c69e (diff) | |
download | nix-18097cbd2e5d3e78c30c9cab807e53a16ca57531.zip |
Fix baud rate constants on sparc64-linux
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), } |