Skip to content

Commit 8c3e43c

Browse files
bors[bot]jmmv
andcommitted
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 <[email protected]>
2 parents 23fd096 + 6a0ff23 commit 8c3e43c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3232
([#949](https://github.com/nix-rust/nix/pull/949)) ([#958](https://github.com/nix-rust/nix/pull/958))
3333
- Added a `acct` wrapper module for enabling and disabling process accounting
3434
([#952](https://github.com/nix-rust/nix/pull/952))
35+
- Added the `time_t` and `suseconds_t` public aliases within `sys::time`.
36+
([#968](https://github.com/nix-rust/nix/pull/968))
3537

3638
### Changed
3739
- Increased required Rust version to 1.24.1

src/sys/time.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::{cmp, fmt, ops};
2-
use libc::{c_long, time_t, suseconds_t, timespec, timeval};
2+
use libc::{c_long, timespec, timeval};
3+
pub use libc::{time_t, suseconds_t};
34

45
pub trait TimeValLike: Sized {
56
#[inline]

0 commit comments

Comments
 (0)