From e9b3c642d56aa39b5b3ec9cecf0baf247421514f 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 aec1ca0ef8..af68d90e97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). socket types on Linux and Android ([#1031](https://github.com/nix-rust/nix/pull/1031)) - Add killpg ([#1034](https://github.com/nix-rust/nix/pull/1034)) +- Added ENOTSUP errno support for Linux and Android. + ([#969](https://github.com/nix-rust/nix/pull/969)) ### Changed - `PollFd` event flags renamed to `PollFlags` ([#1024](https://github.com/nix-rust/nix/pull/1024/)) diff --git a/src/errno.rs b/src/errno.rs index 977ea0b64d..002c08a875 100644 --- a/src/errno.rs +++ b/src/errno.rs @@ -630,6 +630,7 @@ mod consts { ENOPROTOOPT = libc::ENOPROTOOPT, EPROTONOSUPPORT = libc::EPROTONOSUPPORT, ESOCKTNOSUPPORT = libc::ESOCKTNOSUPPORT, + ENOTSUP = libc::ENOTSUP, EOPNOTSUPP = libc::EOPNOTSUPP, EPFNOSUPPORT = libc::EPFNOSUPPORT, EAFNOSUPPORT = libc::EAFNOSUPPORT,