From 3d939ae6991ea4e5471d0fc1ea2a7dfa462df3be Mon Sep 17 00:00:00 2001 From: Benny Siegert Date: Sun, 27 Dec 2020 11:24:46 +0000 Subject: [PATCH 1/3] Add errno function definition for NetBSD --- serial-unix/src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serial-unix/src/error.rs b/serial-unix/src/error.rs index 293772d..60d7b5c 100644 --- a/serial-unix/src/error.rs +++ b/serial-unix/src/error.rs @@ -64,7 +64,7 @@ pub fn errno() -> i32 { __dfly_error() } - #[cfg(target_os = "openbsd")] + #[cfg(any(target_os = "openbsd", target_os = "netbsd"))] unsafe fn errno_location() -> *const c_int { extern { fn __errno() -> *const c_int; } __errno() From af950068a531b236d0cf596ac70ba516b08ae806 Mon Sep 17 00:00:00 2001 From: Benny Siegert Date: Sun, 27 Dec 2020 11:26:25 +0000 Subject: [PATCH 2/3] Bump dependency versions for NetBSD support --- serial-unix/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/serial-unix/Cargo.toml b/serial-unix/Cargo.toml index e5301c9..f558ad3 100644 --- a/serial-unix/Cargo.toml +++ b/serial-unix/Cargo.toml @@ -14,5 +14,5 @@ categories = ["hardware-support", "os", "os::unix-apis"] [dependencies] serial-core = { version = "0.4", path = "../serial-core" } libc = "0.2.1" -termios = "0.2.2" -ioctl-rs = "0.1.5" +termios = "0.3" +ioctl-rs = "0.2" From 8791b905dea8d48bab91efbaf2981f759f800df4 Mon Sep 17 00:00:00 2001 From: Benny Siegert Date: Sat, 27 Mar 2021 20:03:40 +0000 Subject: [PATCH 3/3] Update READMEs with compatibility information --- serial-unix/README.md | 1 + serial/README.md | 2 ++ 2 files changed, 3 insertions(+) diff --git a/serial-unix/README.md b/serial-unix/README.md index a83f302..77180b3 100644 --- a/serial-unix/README.md +++ b/serial-unix/README.md @@ -12,6 +12,7 @@ API. The following platforms are confirmed to be compatible: * Linux (x86_64, armv6l) * OS X (x86_64) * FreeBSD (amd64) +* NetBSD (amd64, evbarm-aarch64) * OpenBSD (amd64) ## Usage diff --git a/serial/README.md b/serial/README.md index 6f638da..7211ddc 100644 --- a/serial/README.md +++ b/serial/README.md @@ -7,12 +7,14 @@ are supported out of the box. * [Documentation](http://dcuddeback.github.io/serial-rs/serial/) ## Compatibility + The `serial` crate is compatible with Windows and any Unix operating system that implements the termios API. The following platforms are confirmed to be compatible: * Linux (x86_64, armv6l) * OS X (x86_64) * FreeBSD (amd64) +* NetBSD (amd64, evbarm-aarch64) * OpenBSD (amd64) * Windows (x86_64)