Skip to content

Commit ed04152

Browse files
committed
Auto merge of #939 - ctrlcctrlv:master, r=alexcrichton
Add FreeBSD `get[pw|gr]ent_r`, forgotten in #934 Sorry, accidentally forgot this when submitting #934..
2 parents 936e16b + 528374e commit ed04152

File tree

3 files changed

+19
-10
lines changed

3 files changed

+19
-10
lines changed

Cargo.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "libc"
4-
version = "0.2.38"
4+
version = "0.2.39"
55
authors = ["The Rust Project Developers"]
66
license = "MIT/Apache-2.0"
77
readme = "README.md"

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,15 @@ extern {
10041004
groups: *mut ::gid_t,
10051005
ngroups: *mut ::c_int) -> ::c_int;
10061006
pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int;
1007+
#[cfg_attr(target_os = "netbsd", link_name = "__getpwent_r50")]
1008+
pub fn getpwent_r(pwd: *mut ::passwd,
1009+
buf: *mut ::c_char,
1010+
buflen: ::size_t,
1011+
result: *mut *mut ::passwd) -> ::c_int;
1012+
pub fn getgrent_r(grp: *mut ::group,
1013+
buf: *mut ::c_char,
1014+
buflen: ::size_t,
1015+
result: *mut *mut ::group) -> ::c_int;
10071016
pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
10081017
pub fn mq_close(mqd: ::mqd_t) -> ::c_int;
10091018
pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;

0 commit comments

Comments
 (0)