Skip to content

Commit 97da394

Browse files
committed
Add ENOTSUP to Linux and Android
While ENOTSUP is defined as equal to EOPNOTSUPP on these platforms, exposing the ENOTSUP symbol (as libc does) allows for writing portable code that may want to reference this error code.
1 parent 8c3e43c commit 97da394

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,7 @@ mod consts {
674674

675675
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
676676
pub const EDEADLOCK: Errno = Errno::EDEADLK;
677+
pub const ENOTSUP: Errno = Errno::EOPNOTSUPP;
677678

678679
pub fn from_i32(e: i32) -> Errno {
679680
use self::Errno::*;

0 commit comments

Comments
 (0)