Skip to content

Commit

Permalink
Merge #968
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
bors[bot] and jmmv committed Nov 8, 2018
2 parents 23fd096 + 6a0ff23 commit 8c3e43c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/sys/time.rs
Original file line number Diff line number Diff line change
@@ -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]
Expand Down

0 comments on commit 8c3e43c

Please sign in to comment.