diff options
author | David Carlier <devnexen@gmail.com> | 2021-11-08 21:48:49 +0000 |
---|---|---|
committer | David Carlier <devnexen@gmail.com> | 2021-11-08 21:48:49 +0000 |
commit | 69405c59af07acbf3083ecd48d6e87ace27096c4 (patch) | |
tree | e5123e832c1ba00a657e9fa0712a90c0a4cbf8f7 /src/unix/bsd/netbsdlike/netbsd/mod.rs | |
parent | cd5de2fb3736fb871f8d7eee2011ae838fe1fcc0 (diff) | |
download | rust-libc-69405c59af07acbf3083ecd48d6e87ace27096c4.tar.gz |
netbsd add uucred struct
Diffstat (limited to 'src/unix/bsd/netbsdlike/netbsd/mod.rs')
-rw-r--r-- | src/unix/bsd/netbsdlike/netbsd/mod.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index 1e2affb7ee..183bd3c890 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -343,6 +343,14 @@ s! { pub sc_groups: [::gid_t; 1], } + pub struct uucred { + pub cr_unused: ::c_ushort, + pub cr_uid: ::uid_t, + pub cr_gid: ::gid_t, + pub cr_ngroups: ::c_int, + pub cr_groups: [::gid_t; NGROUPS_MAX as usize], + } + pub struct unpcbid { pub unp_pid: ::pid_t, pub unp_euid: ::uid_t, @@ -2012,6 +2020,8 @@ pub const KVME_FLAG_PAGEABLE: ::c_int = 0x000000008; pub const KVME_FLAG_GROWS_UP: ::c_int = 0x000000010; pub const KVME_FLAG_GROWS_DOWN: ::c_int = 0x000000020; +pub const NGROUPS_MAX: ::c_int = 16; + const_fn! { {const} fn _ALIGN(p: usize) -> usize { (p + _ALIGNBYTES) & !_ALIGNBYTES |