@@ -249,46 +249,46 @@ impl SocketCred {
249
249
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
250
250
#[ must_use]
251
251
pub fn new ( ) -> SocketCred {
252
- SocketCred ( libc:: cmsgcred { cmsgcred_pid : 0 , cmsgcred_uid : 0 , cmsgcred_gid : 0 } )
252
+ SocketCred ( libc:: cmsgcred { cmcred_pid : 0 , cmcred_uid : 0 , cmcred_gid : 0 } )
253
253
}
254
254
255
255
/// Set the PID.
256
256
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
257
257
pub fn set_pid ( & mut self , pid : libc:: pid_t ) {
258
- self . 0 . cmsgcred_pid = pid;
258
+ self . 0 . cmcred_pid = pid;
259
259
}
260
260
261
261
/// Get the current PID.
262
262
#[ must_use]
263
263
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
264
264
pub fn get_pid ( & self ) -> libc:: pid_t {
265
- self . 0 . cmsgcred_pid
265
+ self . 0 . cmcred_pid
266
266
}
267
267
268
268
/// Set the UID.
269
269
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
270
270
pub fn set_uid ( & mut self , uid : libc:: uid_t ) {
271
- self . 0 . cmsgcred_uid = uid;
271
+ self . 0 . cmcred_uid = uid;
272
272
}
273
273
274
274
/// Get the current UID.
275
275
#[ must_use]
276
276
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
277
277
pub fn get_uid ( & self ) -> libc:: uid_t {
278
- self . 0 . cmsgcred_uid
278
+ self . 0 . cmcred_uid
279
279
}
280
280
281
281
/// Set the GID.
282
282
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
283
283
pub fn set_gid ( & mut self , gid : libc:: gid_t ) {
284
- self . 0 . cmsgcred_gid = gid;
284
+ self . 0 . cmcred_gid = gid;
285
285
}
286
286
287
287
/// Get the current GID.
288
288
#[ must_use]
289
289
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
290
290
pub fn get_gid ( & self ) -> libc:: gid_t {
291
- self . 0 . cmsgcred_gid
291
+ self . 0 . cmcred_gid
292
292
}
293
293
}
294
294
@@ -340,7 +340,7 @@ pub enum AncillaryError {
340
340
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
341
341
pub enum AncillaryData < ' a > {
342
342
ScmRights ( ScmRights < ' a > ) ,
343
- #[ cfg( any( doc, target_os = "android" , target_os = "linux" , ) ) ]
343
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" , target_os = "dragonfly" ) ) ]
344
344
ScmCredentials ( ScmCredentials < ' a > ) ,
345
345
}
346
346
@@ -363,7 +363,7 @@ impl<'a> AncillaryData<'a> {
363
363
///
364
364
/// `data` must contain a valid control message and the control message must be type of
365
365
/// `SOL_SOCKET` and level of `SCM_CREDENTIALS` or `SCM_CREDS`.
366
- #[ cfg( any( doc, target_os = "android" , target_os = "linux" , ) ) ]
366
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" , target_os = "dragonfly" ) ) ]
367
367
unsafe fn as_credentials ( data : & ' a [ u8 ] ) -> Self {
368
368
let ancillary_data_iter = AncillaryDataIter :: new ( data) ;
369
369
let scm_credentials = ScmCredentials ( ancillary_data_iter) ;
0 commit comments