@@ -530,7 +530,8 @@ impl SockaddrLike for UnixAddr {
530530 linux_android,
531531 target_os = "fuchsia" ,
532532 solarish,
533- target_os = "redox"
533+ target_os = "redox" ,
534+ target_os = "cygwin" ,
534535 ) ) ]
535536 fn len ( & self ) -> libc:: socklen_t {
536537 self . sun_len . into ( )
@@ -1171,6 +1172,7 @@ impl SockaddrLike for SockaddrStorage {
11711172 linux_android,
11721173 target_os = "fuchsia" ,
11731174 solarish,
1175+ target_os = "cygwin" ,
11741176 ) ) ]
11751177 if i32:: from ( ss. ss_family ) == libc:: AF_UNIX {
11761178 // Safe because we UnixAddr is strictly smaller than
@@ -1227,7 +1229,7 @@ impl SockaddrLike for SockaddrStorage {
12271229 }
12281230 }
12291231
1230- #[ cfg( any( linux_android, target_os = "fuchsia" , solarish) ) ]
1232+ #[ cfg( any( linux_android, target_os = "fuchsia" , solarish, target_os = "cygwin" ) ) ]
12311233 fn len ( & self ) -> libc:: socklen_t {
12321234 match self . as_unix_addr ( ) {
12331235 // The UnixAddr type knows its own length
@@ -1289,6 +1291,7 @@ impl SockaddrStorage {
12891291 if #[ cfg( any( linux_android,
12901292 target_os = "fuchsia" ,
12911293 solarish,
1294+ target_os = "cygwin" ,
12921295 ) ) ]
12931296 {
12941297 let p = unsafe { & self . ss as * const libc:: sockaddr_storage } ;
@@ -1318,6 +1321,7 @@ impl SockaddrStorage {
13181321 if #[ cfg( any( linux_android,
13191322 target_os = "fuchsia" ,
13201323 solarish,
1324+ target_os = "cygwin" ,
13211325 ) ) ]
13221326 {
13231327 let p = unsafe { & self . ss as * const libc:: sockaddr_storage } ;
@@ -2193,7 +2197,7 @@ mod tests {
21932197 }
21942198 }
21952199
2196- #[ cfg( not( any( target_os = "hurd" , target_os = "redox" ) ) ) ]
2200+ #[ cfg( not( any( target_os = "hurd" , target_os = "redox" , target_os = "cygwin" ) ) ) ]
21972201 #[ allow( clippy:: cast_ptr_alignment) ]
21982202 mod link {
21992203 #[ cfg( any( apple_targets, solarish) ) ]
0 commit comments