summaryrefslogtreecommitdiff
path: root/src/unix/bsd/freebsdlike/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-03-05 16:06:48 +0000
committerbors <bors@rust-lang.org>2018-03-05 16:06:48 +0000
commited04152aacf5b4798f78ff13396f3c04c0a77144 (patch)
treec270313945827d6fa97dff4f47cebce1dcf85851 /src/unix/bsd/freebsdlike/mod.rs
parent936e16bccb602e438dbf36a6f3b98623c7ed1833 (diff)
parent528374ed9af4efa548702a96bce797eae0b63632 (diff)
downloadrust-libc-ed04152aacf5b4798f78ff13396f3c04c0a77144.tar.gz
Auto merge of #939 - ctrlcctrlv:master, r=alexcrichton0.2.39
Add FreeBSD `get[pw|gr]ent_r`, forgotten in #934 Sorry, accidentally forgot this when submitting #934..
Diffstat (limited to 'src/unix/bsd/freebsdlike/mod.rs')
-rw-r--r--src/unix/bsd/freebsdlike/mod.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs
index c43bdcae53..b3922426f6 100644
--- a/src/unix/bsd/freebsdlike/mod.rs
+++ b/src/unix/bsd/freebsdlike/mod.rs
@@ -1004,6 +1004,15 @@ extern {
groups: *mut ::gid_t,
ngroups: *mut ::c_int) -> ::c_int;
pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int;
+ #[cfg_attr(target_os = "netbsd", link_name = "__getpwent_r50")]
+ pub fn getpwent_r(pwd: *mut ::passwd,
+ buf: *mut ::c_char,
+ buflen: ::size_t,
+ result: *mut *mut ::passwd) -> ::c_int;
+ pub fn getgrent_r(grp: *mut ::group,
+ buf: *mut ::c_char,
+ buflen: ::size_t,
+ result: *mut *mut ::group) -> ::c_int;
pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t;
pub fn mq_close(mqd: ::mqd_t) -> ::c_int;
pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int;