File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
library/std/src/os/unix/net Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ impl SocketAddr {
240
240
241
241
// macOS seems to return a len of 16 and a zeroed sun_path for unnamed addresses
242
242
if len == 0
243
- || ( cfg ! ( not( any( target_os = "linux" , target_os = "android" ) ) )
243
+ || ( cfg ! ( not( any( target_os = "linux" , target_os = "android" , target_os = "cygwin" ) ) )
244
244
&& self . addr . sun_path [ 0 ] == 0 )
245
245
{
246
246
AddressKind :: Unnamed
Original file line number Diff line number Diff line change @@ -289,6 +289,7 @@ fn test_unix_datagram() {
289
289
290
290
#[ test]
291
291
#[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
292
+ #[ cfg_attr( target_os = "cygwin" , ignore) ] // Cygwin autobinds an address
292
293
fn test_unnamed_unix_datagram ( ) {
293
294
let dir = tmpdir ( ) ;
294
295
let path1 = dir. path ( ) . join ( "sock1" ) ;
@@ -307,6 +308,7 @@ fn test_unnamed_unix_datagram() {
307
308
308
309
#[ test]
309
310
#[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
311
+ #[ cfg_attr( target_os = "cygwin" , ignore) ] // Cygwin fails to determine the addr type from recvfrom
310
312
fn test_unix_datagram_connect_to_recv_addr ( ) {
311
313
let dir = tmpdir ( ) ;
312
314
let path1 = dir. path ( ) . join ( "sock1" ) ;
@@ -332,6 +334,7 @@ fn test_unix_datagram_connect_to_recv_addr() {
332
334
333
335
#[ test]
334
336
#[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
337
+ #[ cfg_attr( target_os = "cygwin" , ignore) ] // Cygwin autobinds an address
335
338
fn test_connect_unix_datagram ( ) {
336
339
let dir = tmpdir ( ) ;
337
340
let path1 = dir. path ( ) . join ( "sock1" ) ;
You can’t perform that action at this time.
0 commit comments