Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing definitions on NetBSD #3927

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions libc-test/semver/netbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1567,6 +1569,7 @@ sync
syscall
sysctl
sysctlbyname
sysctlnametomib
sysctldesc
tcp_info
telldir
Expand Down
7 changes: 7 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1873,6 +1873,8 @@ pub const MNT_NOWAIT: ::c_int = 2;
pub const MNT_LAZY: ::c_int = 3;

//<sys/timex.h>
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;
Expand Down Expand Up @@ -2646,6 +2648,11 @@ extern "C" {
newp: *const ::c_void,
newlen: ::size_t,
) -> ::c_int;
pub fn sysctlnametomib(
sname: *const ::c_char,
name: *mut ::c_int,
namelenp: *mut ::size_t,
) -> ::c_int;
#[link_name = "__kevent50"]
pub fn kevent(
kq: ::c_int,
Expand Down