Skip to content

netbsd add string_to_flags api #2408

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

Merged
merged 1 commit into from
Sep 18, 2021
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
2 changes: 2 additions & 0 deletions libc-test/semver/netbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,7 @@ fchdir
fchflags
fdatasync
fdopendir
flags_to_string
fmemopen
forkpty
freeifaddrs
Expand Down Expand Up @@ -1367,6 +1368,7 @@ srand
stack_t
strcasecmp
strcasestr
string_to_flags
strncasecmp
strndup
strpct
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 @@ -2388,6 +2388,13 @@ extern "C" {
tpe: ::c_int,
);

pub fn string_to_flags(
string_p: *mut *mut ::c_char,
setp: *mut ::c_ulong,
clrp: *mut ::c_ulong,
) -> ::c_int;
pub fn flags_to_string(flags: ::c_ulong, def: *const ::c_char) -> ::c_int;

pub fn kinfo_getvmmap(pid: ::pid_t, cntp: *mut ::size_t) -> *mut kinfo_vmentry;
}

Expand Down