Skip to content

Commit

Permalink
Add ENOTSUP to Linux and Android
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmv committed Nov 8, 2018
1 parent 8c3e43c commit 7cbe81c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
([#952](https://github.com/nix-rust/nix/pull/952))
- Added the `time_t` and `suseconds_t` public aliases within `sys::time`.
([#968](https://github.com/nix-rust/nix/pull/968))
- Added ENOTSUP errno support for Linux and Android.
([#969](https://github.com/nix-rust/nix/pull/969))

### Changed
- Increased required Rust version to 1.24.1
Expand Down
5 changes: 2 additions & 3 deletions src/errno.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ fn desc(errno: Errno) -> &'static str {
ECONNREFUSED => "Connection refused",
EHOSTDOWN => "Host is down",
EHOSTUNREACH => "No route to host",
ENOTSUP => "Operation not supported",

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

#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
ENOTSUP => "Operation not supported",

#[cfg(any(target_os = "macos", target_os = "freebsd", target_os = "dragonfly", target_os = "ios", target_os = "openbsd", target_os = "netbsd"))]
EPROCLIM => "Too many processes",

Expand Down Expand Up @@ -629,6 +627,7 @@ mod consts {
ENOPROTOOPT = libc::ENOPROTOOPT,
EPROTONOSUPPORT = libc::EPROTONOSUPPORT,
ESOCKTNOSUPPORT = libc::ESOCKTNOSUPPORT,
ENOTSUP = libc::ENOTSUP,
EOPNOTSUPP = libc::EOPNOTSUPP,
EPFNOSUPPORT = libc::EPFNOSUPPORT,
EAFNOSUPPORT = libc::EAFNOSUPPORT,
Expand Down

0 comments on commit 7cbe81c

Please sign in to comment.