Skip to content

Commit 65e5cf4

Browse files
author
Bryant Mairs
committed
Fix B460800 and B921600 baud rates for netbsd
1 parent efd9e15 commit 65e5cf4

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1212
([#837](https://github.com/nix-rust/nix/pull/837))
1313

1414
### Fixed
15+
- Properly exposed 460800 and 921600 baud rates on NetBSD
16+
([#837](https://github.com/nix-rust/nix/pull/837))
1517

1618
### Removed
1719

src/sys/termios.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -345,18 +345,18 @@ libc_enum!{
345345
B115200,
346346
B230400,
347347
#[cfg(any(target_os = "android",
348-
target_os = "freebsd",
349-
target_os = "linux",
350-
taget_os = "netbsd"))]
348+
target_os = "freebsd",
349+
target_os = "linux",
350+
target_os = "netbsd"))]
351351
B460800,
352352
#[cfg(any(target_os = "android", target_os = "linux"))]
353353
B500000,
354354
#[cfg(any(target_os = "android", target_os = "linux"))]
355355
B576000,
356356
#[cfg(any(target_os = "android",
357-
target_os = "freebsd",
358-
target_os = "linux",
359-
taget_os = "netbsd"))]
357+
target_os = "freebsd",
358+
target_os = "linux",
359+
target_os = "netbsd"))]
360360
B921600,
361361
#[cfg(any(target_os = "android", target_os = "linux"))]
362362
B1000000,
@@ -444,7 +444,7 @@ impl From<libc::speed_t> for BaudRate {
444444
#[cfg(any(target_os = "android",
445445
target_os = "freebsd",
446446
target_os = "linux",
447-
taget_os = "netbsd"))]
447+
target_os = "netbsd"))]
448448
B460800 => BaudRate::B460800,
449449
#[cfg(any(target_os = "android", target_os = "linux"))]
450450
B500000 => BaudRate::B500000,
@@ -453,7 +453,7 @@ impl From<libc::speed_t> for BaudRate {
453453
#[cfg(any(target_os = "android",
454454
target_os = "freebsd",
455455
target_os = "linux",
456-
taget_os = "netbsd"))]
456+
target_os = "netbsd"))]
457457
B921600 => BaudRate::B921600,
458458
#[cfg(any(target_os = "android", target_os = "linux"))]
459459
B1000000 => BaudRate::B1000000,

0 commit comments

Comments
 (0)