File tree 2 files changed +21
-2
lines changed
2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 12
12
13
13
//! Unix-specific networking functionality
14
14
15
+ #[ cfg( unix) ]
15
16
use libc;
16
17
18
+ // FIXME(#43348): Make libc adapt #[doc(cfg(...))] so we don't need these fake definitions here?
19
+ #[ cfg( not( unix) ) ]
20
+ mod libc {
21
+ pub use libc:: c_int;
22
+ pub type socklen_t = u32 ;
23
+ pub struct sockaddr ;
24
+ #[ derive( Clone ) ]
25
+ pub struct sockaddr_un ;
26
+ }
27
+
17
28
use ascii;
18
29
use ffi:: OsStr ;
19
30
use fmt;
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ pub const PIPE_READMODE_BYTE: DWORD = 0x00000000;
301
301
pub const FD_SETSIZE : usize = 64 ;
302
302
303
303
#[ repr( C ) ]
304
- #[ cfg( target_arch = "x86" ) ]
304
+ #[ cfg( not ( target_pointer_width = "64" ) ) ]
305
305
pub struct WSADATA {
306
306
pub wVersion : WORD ,
307
307
pub wHighVersion : WORD ,
@@ -312,7 +312,7 @@ pub struct WSADATA {
312
312
pub lpVendorInfo : * mut u8 ,
313
313
}
314
314
#[ repr( C ) ]
315
- #[ cfg( target_arch = "x86_64 " ) ]
315
+ #[ cfg( target_pointer_width = "64 " ) ]
316
316
pub struct WSADATA {
317
317
pub wVersion : WORD ,
318
318
pub wHighVersion : WORD ,
@@ -768,6 +768,14 @@ pub struct FLOATING_SAVE_AREA {
768
768
_Dummy : [ u8 ; 512 ] // FIXME: Fill this out
769
769
}
770
770
771
+ // FIXME(#43348): This structure is used for backtrace only, and a fake
772
+ // definition is provided here only to allow rustdoc to pass type-check. This
773
+ // will not appear in the final documentation. This should be also defined for
774
+ // other architectures supported by Windows such as ARM, and for historical
775
+ // interest, maybe MIPS and PowerPC as well.
776
+ #[ cfg( all( dox, not( any( target_arch = "x86_64" , target_arch = "x86" ) ) ) ) ]
777
+ pub enum CONTEXT { }
778
+
771
779
#[ repr( C ) ]
772
780
pub struct SOCKADDR_STORAGE_LH {
773
781
pub ss_family : ADDRESS_FAMILY ,
You can’t perform that action at this time.
0 commit comments