Skip to content

Commit 22633e2

Browse files
committed
Auto merge of #1922 - maxbla:master, r=JohnTitor
Add clock_nanosleep to freebsd and netbsd fixes #1921
2 parents e43bddc + a6c451d commit 22633e2

File tree

2 files changed

+12
-0
lines changed
  • src/unix/bsd

2 files changed

+12
-0
lines changed

Diff for: src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,12 @@ extern "C" {
221221
msgtyp: ::c_long,
222222
msgflg: ::c_int,
223223
) -> ::ssize_t;
224+
pub fn clock_nanosleep(
225+
clk_id: ::clockid_t,
226+
flags: ::c_int,
227+
rqtp: *const ::timespec,
228+
rmtp: *mut ::timespec,
229+
) -> ::c_int;
224230
}
225231

226232
cfg_if! {

Diff for: src/unix/bsd/netbsdlike/netbsd/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -1743,6 +1743,12 @@ safe_f! {
17431743
extern "C" {
17441744
pub fn ntp_adjtime(buf: *mut timex) -> ::c_int;
17451745
pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int;
1746+
pub fn clock_nanosleep(
1747+
clk_id: ::clockid_t,
1748+
flags: ::c_int,
1749+
rqtp: *const ::timespec,
1750+
rmtp: *mut ::timespec,
1751+
) -> ::c_int;
17461752
}
17471753

17481754
#[link(name = "rt")]

0 commit comments

Comments
 (0)