Skip to content

Commit

Permalink
Fix B460800 and B921600 baud rates for netbsd
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryant Mairs committed Jan 15, 2018
1 parent 6d0df3e commit 258461c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Fix potential memory corruption on non-Linux platforms when using
`sendmsg`/`recvmsg`, caused by mismatched `msghdr` definition.
([#648](https://github.com/nix-rust/nix/pull/648))
- Expose 460800 and 921600 baud rates on NetBSD
([#837](https://github.com/nix-rust/nix/pull/837))

### Removed
- The syscall module has been removed. This only exposed enough functionality for
Expand Down
16 changes: 8 additions & 8 deletions src/sys/termios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,18 +224,18 @@ libc_enum!{
B115200,
B230400,
#[cfg(any(target_os = "android",
target_os = "freebsd",
target_os = "linux",
taget_os = "netbsd"))]
target_os = "freebsd",
target_os = "linux",
target_os = "netbsd"))]
B460800,
#[cfg(any(target_os = "android", target_os = "linux"))]
B500000,
#[cfg(any(target_os = "android", target_os = "linux"))]
B576000,
#[cfg(any(target_os = "android",
target_os = "freebsd",
target_os = "linux",
taget_os = "netbsd"))]
target_os = "freebsd",
target_os = "linux",
target_os = "netbsd"))]
B921600,
#[cfg(any(target_os = "android", target_os = "linux"))]
B1000000,
Expand Down Expand Up @@ -323,7 +323,7 @@ impl From<libc::speed_t> for BaudRate {
#[cfg(any(target_os = "android",
target_os = "freebsd",
target_os = "linux",
taget_os = "netbsd"))]
target_os = "netbsd"))]
B460800 => BaudRate::B460800,
#[cfg(any(target_os = "android", target_os = "linux"))]
B500000 => BaudRate::B500000,
Expand All @@ -332,7 +332,7 @@ impl From<libc::speed_t> for BaudRate {
#[cfg(any(target_os = "android",
target_os = "freebsd",
target_os = "linux",
taget_os = "netbsd"))]
target_os = "netbsd"))]
B921600 => BaudRate::B921600,
#[cfg(any(target_os = "android", target_os = "linux"))]
B1000000 => BaudRate::B1000000,
Expand Down

0 comments on commit 258461c

Please sign in to comment.