Skip to content

Commit 7cbe81c

Browse files
committed
Add ENOTSUP to Linux and Android
1 parent 8c3e43c commit 7cbe81c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3434
([#952](https://github.com/nix-rust/nix/pull/952))
3535
- Added the `time_t` and `suseconds_t` public aliases within `sys::time`.
3636
([#968](https://github.com/nix-rust/nix/pull/968))
37+
- Added ENOTSUP errno support for Linux and Android.
38+
([#969](https://github.com/nix-rust/nix/pull/969))
3739

3840
### Changed
3941
- Increased required Rust version to 1.24.1

src/errno.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ fn desc(errno: Errno) -> &'static str {
202202
ECONNREFUSED => "Connection refused",
203203
EHOSTDOWN => "Host is down",
204204
EHOSTUNREACH => "No route to host",
205+
ENOTSUP => "Operation not supported",
205206

206207
#[cfg(any(target_os = "linux", target_os = "android"))]
207208
ECHRNG => "Channel number out of range",
@@ -428,9 +429,6 @@ fn desc(errno: Errno) -> &'static str {
428429
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "ios"))]
429430
EOWNERDEAD => "Previous owner died",
430431

431-
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
432-
ENOTSUP => "Operation not supported",
433-
434432
#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
435433
EPROCLIM => "Too many processes",
436434

@@ -629,6 +627,7 @@ mod consts {
629627
ENOPROTOOPT = libc::ENOPROTOOPT,
630628
EPROTONOSUPPORT = libc::EPROTONOSUPPORT,
631629
ESOCKTNOSUPPORT = libc::ESOCKTNOSUPPORT,
630+
ENOTSUP = libc::ENOTSUP,
632631
EOPNOTSUPP = libc::EOPNOTSUPP,
633632
EPFNOSUPPORT = libc::EPFNOSUPPORT,
634633
EAFNOSUPPORT = libc::EAFNOSUPPORT,

0 commit comments

Comments
 (0)