From 97da394943dda9ce35a2c22ee130344c63da20f9 Mon Sep 17 00:00:00 2001 From: Julio Merino Date: Thu, 8 Nov 2018 17:23:43 -0500 Subject: [PATCH] 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. --- CHANGELOG.md | 2 ++ src/errno.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91300043ed..f7a7d52310 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/errno.rs b/src/errno.rs index 0a38ab69f4..40dba294ec 100644 --- a/src/errno.rs +++ b/src/errno.rs @@ -674,6 +674,7 @@ mod consts { pub const EWOULDBLOCK: Errno = Errno::EAGAIN; pub const EDEADLOCK: Errno = Errno::EDEADLK; + pub const ENOTSUP: Errno = Errno::EOPNOTSUPP; pub fn from_i32(e: i32) -> Errno { use self::Errno::*;