@@ -530,7 +530,8 @@ impl SockaddrLike for UnixAddr {
530
530
linux_android,
531
531
target_os = "fuchsia" ,
532
532
solarish,
533
- target_os = "redox"
533
+ target_os = "redox" ,
534
+ target_os = "cygwin" ,
534
535
) ) ]
535
536
fn len ( & self ) -> libc:: socklen_t {
536
537
self . sun_len . into ( )
@@ -1171,6 +1172,7 @@ impl SockaddrLike for SockaddrStorage {
1171
1172
linux_android,
1172
1173
target_os = "fuchsia" ,
1173
1174
solarish,
1175
+ target_os = "cygwin" ,
1174
1176
) ) ]
1175
1177
if i32:: from ( ss. ss_family ) == libc:: AF_UNIX {
1176
1178
// Safe because we UnixAddr is strictly smaller than
@@ -1227,7 +1229,7 @@ impl SockaddrLike for SockaddrStorage {
1227
1229
}
1228
1230
}
1229
1231
1230
- #[ cfg( any( linux_android, target_os = "fuchsia" , solarish) ) ]
1232
+ #[ cfg( any( linux_android, target_os = "fuchsia" , solarish, target_os = "cygwin" ) ) ]
1231
1233
fn len ( & self ) -> libc:: socklen_t {
1232
1234
match self . as_unix_addr ( ) {
1233
1235
// The UnixAddr type knows its own length
@@ -1289,6 +1291,7 @@ impl SockaddrStorage {
1289
1291
if #[ cfg( any( linux_android,
1290
1292
target_os = "fuchsia" ,
1291
1293
solarish,
1294
+ target_os = "cygwin" ,
1292
1295
) ) ]
1293
1296
{
1294
1297
let p = unsafe { & self . ss as * const libc:: sockaddr_storage } ;
@@ -1318,6 +1321,7 @@ impl SockaddrStorage {
1318
1321
if #[ cfg( any( linux_android,
1319
1322
target_os = "fuchsia" ,
1320
1323
solarish,
1324
+ target_os = "cygwin" ,
1321
1325
) ) ]
1322
1326
{
1323
1327
let p = unsafe { & self . ss as * const libc:: sockaddr_storage } ;
@@ -2193,7 +2197,7 @@ mod tests {
2193
2197
}
2194
2198
}
2195
2199
2196
- #[ cfg( not( any( target_os = "hurd" , target_os = "redox" ) ) ) ]
2200
+ #[ cfg( not( any( target_os = "hurd" , target_os = "redox" , target_os = "cygwin" ) ) ) ]
2197
2201
#[ allow( clippy:: cast_ptr_alignment) ]
2198
2202
mod link {
2199
2203
#[ cfg( any( apple_targets, solarish) ) ]
0 commit comments