@@ -249,46 +249,46 @@ impl SocketCred {
249249 #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
250250 #[ must_use]
251251 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 } )
253253 }
254254
255255 /// Set the PID.
256256 #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
257257 pub fn set_pid ( & mut self , pid : libc:: pid_t ) {
258- self . 0 . cmsgcred_pid = pid;
258+ self . 0 . cmcred_pid = pid;
259259 }
260260
261261 /// Get the current PID.
262262 #[ must_use]
263263 #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
264264 pub fn get_pid ( & self ) -> libc:: pid_t {
265- self . 0 . cmsgcred_pid
265+ self . 0 . cmcred_pid
266266 }
267267
268268 /// Set the UID.
269269 #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
270270 pub fn set_uid ( & mut self , uid : libc:: uid_t ) {
271- self . 0 . cmsgcred_uid = uid;
271+ self . 0 . cmcred_uid = uid;
272272 }
273273
274274 /// Get the current UID.
275275 #[ must_use]
276276 #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
277277 pub fn get_uid ( & self ) -> libc:: uid_t {
278- self . 0 . cmsgcred_uid
278+ self . 0 . cmcred_uid
279279 }
280280
281281 /// Set the GID.
282282 #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
283283 pub fn set_gid ( & mut self , gid : libc:: gid_t ) {
284- self . 0 . cmsgcred_gid = gid;
284+ self . 0 . cmcred_gid = gid;
285285 }
286286
287287 /// Get the current GID.
288288 #[ must_use]
289289 #[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
290290 pub fn get_gid ( & self ) -> libc:: gid_t {
291- self . 0 . cmsgcred_gid
291+ self . 0 . cmcred_gid
292292 }
293293}
294294
@@ -340,7 +340,7 @@ pub enum AncillaryError {
340340#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
341341pub enum AncillaryData < ' a > {
342342 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" ) ) ]
344344 ScmCredentials ( ScmCredentials < ' a > ) ,
345345}
346346
@@ -363,7 +363,7 @@ impl<'a> AncillaryData<'a> {
363363 ///
364364 /// `data` must contain a valid control message and the control message must be type of
365365 /// `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" ) ) ]
367367 unsafe fn as_credentials ( data : & ' a [ u8 ] ) -> Self {
368368 let ancillary_data_iter = AncillaryDataIter :: new ( data) ;
369369 let scm_credentials = ScmCredentials ( ancillary_data_iter) ;
0 commit comments