summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-11-08 16:27:50 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-11-08 16:27:50 +0000
commit8c3e43ccd4fc83583c16848a35410022f5a8efc9 (patch)
tree373594416fe72d33b95a8b67c2b6855b3187f5a2
parent23fd0968d6bc8fafba92c20b6ae3be1e8da8a861 (diff)
parent6a0ff23faceca6dddd81755e233b705c855fc81c (diff)
downloadnix-8c3e43ccd4fc83583c16848a35410022f5a8efc9.zip
Merge #968
968: Make sys::time::{time_t, suseconds_t} public r=asomers a=jmmv This allows handling the return values of other public functions (such as TimeVal's tv_sec and tv_usec) without having to pull in these types from libc (which is ugly if a project is trying to use nix exclusively to avoid libc's unsafety). Co-authored-by: Julio Merino <julio@meroh.net>
-rw-r--r--CHANGELOG.md2
-rw-r--r--src/sys/time.rs3
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9d498288..91300043 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,6 +32,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
([#949](https://github.com/nix-rust/nix/pull/949)) ([#958](https://github.com/nix-rust/nix/pull/958))
- Added a `acct` wrapper module for enabling and disabling process accounting
([#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))
### Changed
- Increased required Rust version to 1.24.1
diff --git a/src/sys/time.rs b/src/sys/time.rs
index 51286a06..e300cfe7 100644
--- a/src/sys/time.rs
+++ b/src/sys/time.rs
@@ -1,5 +1,6 @@
use std::{cmp, fmt, ops};
-use libc::{c_long, time_t, suseconds_t, timespec, timeval};
+use libc::{c_long, timespec, timeval};
+pub use libc::{time_t, suseconds_t};
pub trait TimeValLike: Sized {
#[inline]