Skip to content

Commit

Permalink
Auto merge of #1922 - maxbla:master, r=JohnTitor
Browse files Browse the repository at this point in the history
Add clock_nanosleep to freebsd and netbsd

fixes #1921
  • Loading branch information
bors committed Oct 15, 2020
2 parents e43bddc + a6c451d commit 22633e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ extern "C" {
msgtyp: ::c_long,
msgflg: ::c_int,
) -> ::ssize_t;
pub fn clock_nanosleep(
clk_id: ::clockid_t,
flags: ::c_int,
rqtp: *const ::timespec,
rmtp: *mut ::timespec,
) -> ::c_int;
}

cfg_if! {
Expand Down
6 changes: 6 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1743,6 +1743,12 @@ safe_f! {
extern "C" {
pub fn ntp_adjtime(buf: *mut timex) -> ::c_int;
pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int;
pub fn clock_nanosleep(
clk_id: ::clockid_t,
flags: ::c_int,
rqtp: *const ::timespec,
rmtp: *mut ::timespec,
) -> ::c_int;
}

#[link(name = "rt")]
Expand Down

0 comments on commit 22633e2

Please sign in to comment.