@@ -9,7 +9,7 @@ use crate::slice::from_raw_parts;
9
9
use crate :: sys:: unix:: ext:: net:: addr:: { sockaddr_un, SocketAddr } ;
10
10
use crate :: sys:: unix:: net:: Socket ;
11
11
12
- #[ cfg( any( target_os = "android" , target_os = "emscripten" , target_os = " linux", ) ) ]
12
+ #[ cfg( any( target_os = "android" , target_os = "linux" , ) ) ]
13
13
use libc:: { gid_t, pid_t, uid_t} ;
14
14
15
15
pub ( super ) fn recv_vectored_with_ancillary_from (
@@ -167,12 +167,12 @@ impl<'a, T> Iterator for AncillaryDataIter<'a, T> {
167
167
}
168
168
169
169
/// Unix credential.
170
- #[ cfg( any( doc, target_os = "android" , target_os = "emscripten" , target_os = " linux", ) ) ]
170
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" , ) ) ]
171
171
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
172
172
#[ derive( Clone ) ]
173
173
pub struct SocketCred ( libc:: ucred ) ;
174
174
175
- #[ cfg( any( doc, target_os = "android" , target_os = "emscripten" , target_os = " linux", ) ) ]
175
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" , ) ) ]
176
176
impl SocketCred {
177
177
/// Create a Unix credential struct.
178
178
///
@@ -237,11 +237,11 @@ impl<'a> Iterator for ScmRights<'a> {
237
237
/// This control message contains unix credentials.
238
238
///
239
239
/// The level is equal to `SOL_SOCKET` and the type is equal to `SCM_CREDENTIALS` or `SCM_CREDS`.
240
- #[ cfg( any( doc, target_os = "android" , target_os = "emscripten" , target_os = " linux", ) ) ]
240
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" , ) ) ]
241
241
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
242
242
pub struct ScmCredentials < ' a > ( AncillaryDataIter < ' a , libc:: ucred > ) ;
243
243
244
- #[ cfg( any( doc, target_os = "android" , target_os = "emscripten" , target_os = " linux", ) ) ]
244
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" , ) ) ]
245
245
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
246
246
impl < ' a > Iterator for ScmCredentials < ' a > {
247
247
type Item = SocketCred ;
@@ -263,7 +263,7 @@ pub enum AncillaryError {
263
263
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
264
264
pub enum AncillaryData < ' a > {
265
265
ScmRights ( ScmRights < ' a > ) ,
266
- #[ cfg( any( doc, target_os = "android" , target_os = "emscripten" , target_os = " linux", ) ) ]
266
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" , ) ) ]
267
267
ScmCredentials ( ScmCredentials < ' a > ) ,
268
268
}
269
269
@@ -286,7 +286,7 @@ impl<'a> AncillaryData<'a> {
286
286
///
287
287
/// `data` must contain a valid control message and the control message must be type of
288
288
/// `SOL_SOCKET` and level of `SCM_CREDENTIALS` or `SCM_CREDENTIALS`.
289
- #[ cfg( any( doc, target_os = "android" , target_os = "emscripten" , target_os = " linux", ) ) ]
289
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" , ) ) ]
290
290
unsafe fn as_credentials ( data : & ' a [ u8 ] ) -> Self {
291
291
let ancillary_data_iter = AncillaryDataIter :: new ( data) ;
292
292
let scm_credentials = ScmCredentials ( ancillary_data_iter) ;
@@ -303,11 +303,7 @@ impl<'a> AncillaryData<'a> {
303
303
match ( * cmsg) . cmsg_level {
304
304
libc:: SOL_SOCKET => match ( * cmsg) . cmsg_type {
305
305
libc:: SCM_RIGHTS => Ok ( AncillaryData :: as_rights ( data) ) ,
306
- #[ cfg( any(
307
- target_os = "android" ,
308
- target_os = "emscripten" ,
309
- target_os = "linux" ,
310
- ) ) ]
306
+ #[ cfg( any( target_os = "android" , target_os = "linux" , ) ) ]
311
307
libc:: SCM_CREDENTIALS => Ok ( AncillaryData :: as_credentials ( data) ) ,
312
308
cmsg_type => {
313
309
Err ( AncillaryError :: Unknown { cmsg_level : libc:: SOL_SOCKET , cmsg_type } )
@@ -505,7 +501,7 @@ impl<'a> SocketAncillary<'a> {
505
501
/// Technically, that means this operation adds a control message with the level `SOL_SOCKET`
506
502
/// and type `SCM_CREDENTIALS` or `SCM_CREDS`.
507
503
///
508
- #[ cfg( any( doc, target_os = "android" , target_os = "emscripten" , target_os = " linux", ) ) ]
504
+ #[ cfg( any( doc, target_os = "android" , target_os = "linux" , ) ) ]
509
505
#[ unstable( feature = "unix_socket_ancillary_data" , issue = "76915" ) ]
510
506
pub fn add_creds ( & mut self , creds : & [ SocketCred ] ) -> bool {
511
507
self . truncated = false ;
0 commit comments