diff options
author | Dan Glastonbury <dan.glastonbury@gmail.com> | 2017-10-17 11:15:52 +1000 |
---|---|---|
committer | Dan Glastonbury <dan.glastonbury@gmail.com> | 2017-10-18 09:51:10 +1000 |
commit | ebb59a27eb76a6248e2478dd5d2a9e4c040961c2 (patch) | |
tree | cd3d1ca6ce1e5c3810f7c832c25e9c0902150006 | |
parent | 5355286c58b626ebda80ea66c019385305cbc674 (diff) | |
download | rust-libc-ebb59a27eb76a6248e2478dd5d2a9e4c040961c2.tar.gz |
freebsd: Add LOCAL_* for local domain sockets.
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/mod.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 6fec75eaaf..0ac797ce4c 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -127,6 +127,14 @@ s! { pub shm_dtime: ::time_t, pub shm_ctime: ::time_t, } + + pub struct xucred { + pub cr_version: ::c_uint, + pub cr_uid: ::uid_t, + pub cr_ngroups: ::c_short, + pub cr_groups: [::gid_t;16], + __cr_unused1: *mut ::c_void, + } } pub const SIGEV_THREAD_ID: ::c_int = 4; @@ -402,6 +410,11 @@ pub const SO_PROTOCOL: ::c_int = 0x1016; pub const SO_PROTOTYPE: ::c_int = SO_PROTOCOL; pub const SO_VENDOR: ::c_int = 0x80000000; +pub const LOCAL_PEERCRED: ::c_int = 1; +pub const LOCAL_CREDS: ::c_int = 2; +pub const LOCAL_CONNWAIT: ::c_int = 4; +pub const LOCAL_VENDOR: ::c_int = SO_VENDOR; + pub const AF_SLOW: ::c_int = 33; pub const AF_SCLUSTER: ::c_int = 34; pub const AF_ARP: ::c_int = 35; @@ -766,6 +779,9 @@ pub const _PC_ACL_NFS4: ::c_int = 64; pub const _SC_CPUSET_SIZE: ::c_int = 122; +pub const XU_NGROUPS: ::c_int = 16; +pub const XUCRED_VERSION: ::c_uint = 0; + extern { pub fn __error() -> *mut ::c_int; |