diff --git a/libc-test/semver/dragonfly.txt b/libc-test/semver/dragonfly.txt index c1942853289dc..20e8a515d36f4 100644 --- a/libc-test/semver/dragonfly.txt +++ b/libc-test/semver/dragonfly.txt @@ -1263,6 +1263,7 @@ chroot clearerr clock_getcpuclockid clock_getres +clock_nanosleep clock_settime cmsgcred cmsghdr diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 68bd4e28b0cf8..59e7e3939eb75 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -4728,6 +4728,11 @@ pub const RB_POWERCYCLE: ::c_int = 0x400000; pub const RB_PROBE: ::c_int = 0x10000000; pub const RB_MULTIPLE: ::c_int = 0x20000000; +// sys/time.h +pub const CLOCK_BOOTTIME: ::clockid_t = ::CLOCK_UPTIME; +pub const CLOCK_REALTIME_COARSE: ::clockid_t = ::CLOCK_REALTIME_FAST; +pub const CLOCK_MONOTONIC_COARSE: ::clockid_t = ::CLOCK_MONOTONIC_FAST; + // sys/timerfd.h pub const TFD_NONBLOCK: ::c_int = ::O_NONBLOCK; @@ -5363,13 +5368,6 @@ extern "C" { pub fn getpagesizes(pagesize: *mut ::size_t, nelem: ::c_int) -> ::c_int; pub fn clock_getcpuclockid2(arg1: ::id_t, arg2: ::c_int, arg3: *mut clockid_t) -> ::c_int; - pub fn clock_nanosleep( - clk_id: ::clockid_t, - flags: ::c_int, - rqtp: *const ::timespec, - rmtp: *mut ::timespec, - ) -> ::c_int; - pub fn strchrnul(s: *const ::c_char, c: ::c_int) -> *mut ::c_char; pub fn shm_create_largepage( diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index d2cd7794b107e..00a944e42bf2d 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -824,15 +824,12 @@ pub const CLOCK_VIRTUAL: ::clockid_t = 1; pub const CLOCK_PROF: ::clockid_t = 2; pub const CLOCK_MONOTONIC: ::clockid_t = 4; pub const CLOCK_UPTIME: ::clockid_t = 5; -pub const CLOCK_BOOTTIME: ::clockid_t = CLOCK_UPTIME; pub const CLOCK_UPTIME_PRECISE: ::clockid_t = 7; pub const CLOCK_UPTIME_FAST: ::clockid_t = 8; pub const CLOCK_REALTIME_PRECISE: ::clockid_t = 9; pub const CLOCK_REALTIME_FAST: ::clockid_t = 10; -pub const CLOCK_REALTIME_COARSE: ::clockid_t = CLOCK_REALTIME_FAST; pub const CLOCK_MONOTONIC_PRECISE: ::clockid_t = 11; pub const CLOCK_MONOTONIC_FAST: ::clockid_t = 12; -pub const CLOCK_MONOTONIC_COARSE: ::clockid_t = CLOCK_MONOTONIC_FAST; pub const CLOCK_SECOND: ::clockid_t = 13; pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 14; pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 15; @@ -1493,6 +1490,13 @@ extern "C" { atflag: ::c_int, ) -> ::c_int; + pub fn clock_nanosleep( + clk_id: ::clockid_t, + flags: ::c_int, + rqtp: *const ::timespec, + rmtp: *mut ::timespec, + ) -> ::c_int; + pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int;