Skip to content

Commit 599ac91

Browse files
author
Al Hoang
committed
haiku: update libc dep and enable clock_getres
1 parent 54b2047 commit 599ac91

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ targets = [
2727
]
2828

2929
[dependencies]
30-
libc = { version = "0.2.121", features = [ "extra_traits" ] }
30+
libc = { version = "0.2.125", features = [ "extra_traits" ] }
3131
bitflags = "1.1"
3232
cfg-if = "1.0"
3333

src/time.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl ClockId {
4242
}
4343

4444
/// Returns resolution of the clock id
45-
#[cfg(not(any(target_os = "redox", target_os = "haiku")))]
45+
#[cfg(not(target_os = "redox"))]
4646
#[cfg_attr(docsrs, doc(cfg(all())))]
4747
pub fn res(self) -> Result<TimeSpec> {
4848
clock_getres(self)
@@ -212,7 +212,7 @@ impl std::fmt::Display for ClockId {
212212

213213
/// Get the resolution of the specified clock, (see
214214
/// [clock_getres(2)](https://pubs.opengroup.org/onlinepubs/7908799/xsh/clock_getres.html)).
215-
#[cfg(not(any(target_os = "redox", target_os = "haiku")))]
215+
#[cfg(not(target_os = "redox"))]
216216
#[cfg_attr(docsrs, doc(cfg(all())))]
217217
pub fn clock_getres(clock_id: ClockId) -> Result<TimeSpec> {
218218
let mut c_time: MaybeUninit<libc::timespec> = MaybeUninit::uninit();

test/test_time.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use nix::time::clock_getcpuclockid;
99
use nix::time::{clock_gettime, ClockId};
1010

11-
#[cfg(not(any(target_os = "redox", target_os = "haiku")))]
11+
#[cfg(not(target_os = "redox"))]
1212
#[test]
1313
pub fn test_clock_getres() {
1414
assert!(nix::time::clock_getres(ClockId::CLOCK_REALTIME).is_ok());
@@ -32,7 +32,7 @@ pub fn test_clock_getcpuclockid() {
3232
assert!(clock_gettime(clock_id).is_ok());
3333
}
3434

35-
#[cfg(not(any(target_os = "redox", target_os = "haiku")))]
35+
#[cfg(not(target_os = "redox"))]
3636
#[test]
3737
pub fn test_clock_id_res() {
3838
assert!(ClockId::CLOCK_REALTIME.res().is_ok());

0 commit comments

Comments
 (0)