diff options
author | Torbjørn Birch Moltu <t.b.moltu@lyse.net> | 2020-02-16 19:11:07 +0100 |
---|---|---|
committer | Torbjørn Birch Moltu <t.b.moltu@lyse.net> | 2021-03-07 21:44:17 +0100 |
commit | adb0a34c87b48cb0f165aa6f967dfb159dbfee52 (patch) | |
tree | cda0bdcd739fcf332a2deed519e6a48985774cee /src/unix | |
parent | fc51a0f327ba148ffc1e6a11b7448f649b80608a (diff) | |
download | rust-libc-adb0a34c87b48cb0f165aa6f967dfb159dbfee52.tar.gz |
Add LOCAL_PEERCRED and related to Dragonfly
https://gitweb.dragonflybsd.org/dragonfly.git/blob/cd4ac48fd186404370e0b8623530b6add4b70400:/sys/sys/ucred.h#l86
None of the other LOCAL_ constants for FreeBSD are available on Dragonfly:
https://gitweb.dragonflybsd.org/dragonfly.git/blob/master:/sys/sys/un.h
Diffstat (limited to 'src/unix')
-rw-r--r-- | src/unix/bsd/freebsdlike/freebsd/mod.rs | 12 | ||||
-rw-r--r-- | src/unix/bsd/freebsdlike/mod.rs | 13 |
2 files changed, 13 insertions, 12 deletions
diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 04bc48dcd6..98b820b4bc 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -89,14 +89,6 @@ s! { pub msg_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 struct stack_t { pub ss_sp: *mut ::c_void, pub ss_size: ::size_t, @@ -629,7 +621,6 @@ 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; @@ -1103,9 +1094,6 @@ 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; - // Flags which can be passed to pdfork(2) pub const PD_DAEMON: ::c_int = 0x00000001; pub const PD_CLOEXEC: ::c_int = 0x00000002; diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 94d30972e8..5e1e9d2351 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -219,6 +219,14 @@ s! { pub cmcred_groups: [::gid_t; CMGROUP_MAX], } + 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 struct rtprio { pub type_: ::c_ushort, pub prio: ::c_ushort, @@ -947,6 +955,8 @@ pub const SO_RCVTIMEO: ::c_int = 0x1006; pub const SO_ERROR: ::c_int = 0x1007; pub const SO_TYPE: ::c_int = 0x1008; +pub const LOCAL_PEERCRED: ::c_int = 1; + pub const SHUT_RD: ::c_int = 0; pub const SHUT_WR: ::c_int = 1; pub const SHUT_RDWR: ::c_int = 2; @@ -1133,6 +1143,9 @@ pub const ST_NOSUID: ::c_ulong = 2; pub const NI_MAXHOST: ::size_t = 1025; +pub const XU_NGROUPS: ::c_int = 16; +pub const XUCRED_VERSION: ::c_uint = 0; + pub const RTLD_LOCAL: ::c_int = 0; pub const RTLD_NODELETE: ::c_int = 0x1000; pub const RTLD_NOLOAD: ::c_int = 0x2000; |