File tree 1 file changed +25
-0
lines changed
src/unix/bsd/freebsdlike/freebsd/freebsd13
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 26
26
pub udata: * mut :: c_void,
27
27
pub ext: [ u64 ; 4 ] ,
28
28
}
29
+
30
+ pub struct sockcred2 {
31
+ pub sc_version: :: c_int,
32
+ pub sc_pid: :: pid_t,
33
+ pub sc_uid: :: uid_t,
34
+ pub sc_euid: :: uid_t,
35
+ pub sc_gid: :: gid_t,
36
+ pub sc_egid: :: gid_t,
37
+ pub sc_ngroups: :: c_int,
38
+ pub sc_groups: [ :: gid_t; 1 ] ,
39
+ }
29
40
}
30
41
31
42
s_no_extra_traits ! {
@@ -208,6 +219,20 @@ pub const EINTEGRITY: ::c_int = 97;
208
219
pub const ELAST : :: c_int = 97 ;
209
220
pub const GRND_INSECURE : :: c_uint = 0x4 ;
210
221
222
+ pub const LOCAL_CREDS_PERSISTENT : :: c_int = 3 ;
223
+ pub const SCM_CREDS2 : :: c_int = 0x08 ;
224
+
225
+ f ! {
226
+ pub fn SOCKCRED2SIZE ( ngrps: usize ) -> usize {
227
+ let ngrps = if ngrps > 0 {
228
+ ngrps - 1
229
+ } else {
230
+ 0
231
+ } ;
232
+ :: mem:: size_of:: <sockcred2>( ) + :: mem:: size_of:: <:: gid_t>( ) * ngrps
233
+ }
234
+ }
235
+
211
236
extern "C" {
212
237
pub fn aio_readv ( aiocbp : * mut :: aiocb ) -> :: c_int ;
213
238
pub fn aio_writev ( aiocbp : * mut :: aiocb ) -> :: c_int ;
You can’t perform that action at this time.
0 commit comments