diff options
author | Julio Merino <julio@meroh.net> | 2018-10-16 21:28:33 -0400 |
---|---|---|
committer | Julio Merino <julio@meroh.net> | 2018-10-16 21:28:33 -0400 |
commit | ea6ed5a097e032fabc94a03916b73c26b0d9f637 (patch) | |
tree | a07590b4f9326d04ed8dd77c36cf7769ecc2d244 | |
parent | 5e077ccc96c7b46eb1d852330d3cec49efbac91e (diff) | |
download | nix-ea6ed5a097e032fabc94a03916b73c26b0d9f637.zip |
Make sys::stat::mode_t public
This allows using e.g. sys::stat::Mode::from_bits() without having to
pull the mode_t type from libc (which is ugly if a project is trying
to use nix exclusively to avoid libc's unsafety).
This change mimics dev_t which was already exposed as public.
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | src/sys/stat.rs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index dd43c9a9..e1e0c01d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Added `futimens` and `utimesat` wrappers ([#944](https://github.com/nix-rust/nix/pull/944)) and a `utimes` wrapper ([#946](https://github.com/nix-rust/nix/pull/946)). - Added `AF_UNSPEC` wrapper to `AddressFamily` ([#948](https://github.com/nix-rust/nix/pull/948)) +- Added the `mode_t` public alias within `sys::stat`. + ([#954](https://github.com/nix-rust/nix/pull/954)) ### Changed - Increased required Rust version to 1.22.1/ diff --git a/src/sys/stat.rs b/src/sys/stat.rs index b810c167..d0f0f8d9 100644 --- a/src/sys/stat.rs +++ b/src/sys/stat.rs @@ -1,10 +1,10 @@ -pub use libc::dev_t; +pub use libc::{dev_t, mode_t}; pub use libc::stat as FileStat; use {Result, NixPath}; use errno::Errno; use fcntl::AtFlags; -use libc::{self, mode_t}; +use libc; use std::mem; use std::os::raw; use std::os::unix::io::RawFd; |