diff --git a/libc-test/semver/netbsd.txt b/libc-test/semver/netbsd.txt index 838f28f71b5d1..e07a7dbf08ae6 100644 --- a/libc-test/semver/netbsd.txt +++ b/libc-test/semver/netbsd.txt @@ -136,6 +136,8 @@ CLD_EXITED CLD_KILLED CLD_STOPPED CLD_TRAPPED +CLOCK_PROCESS_CPUTIME_ID +CLOCK_THREAD_CPUTIME_ID CMSG_DATA CMSG_FIRSTHDR CMSG_LEN @@ -1567,6 +1569,7 @@ sync syscall sysctl sysctlbyname +sysctlnametomib sysctldesc tcp_info telldir diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index f919b73e5c2f4..bc8d4a53e509f 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -1873,6 +1873,8 @@ pub const MNT_NOWAIT: ::c_int = 2; pub const MNT_LAZY: ::c_int = 3; // +pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2; +pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 4; pub const NTP_API: ::c_int = 4; pub const MAXPHASE: ::c_long = 500000000; pub const MAXFREQ: ::c_long = 500000; @@ -2646,6 +2648,11 @@ extern "C" { newp: *const ::c_void, newlen: ::size_t, ) -> ::c_int; + pub fn sysctlnametomib( + name: *const ::c_char, + mibp: *mut ::c_int, + sizep: *mut ::size_t, + ) -> ::c_int; #[link_name = "__kevent50"] pub fn kevent( kq: ::c_int,