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 @@ -241,7 +241,7 @@ impl SocketAddr {
241241
242242 // macOS seems to return a len of 16 and a zeroed sun_path for unnamed addresses
243243 if len == 0
244- || ( cfg ! ( not( any( target_os = "linux" , target_os = "android" ) ) )
244+ || ( cfg ! ( not( any( target_os = "linux" , target_os = "android" , target_os = "cygwin" ) ) )
245245 && self . addr . sun_path [ 0 ] == 0 )
246246 {
247247 AddressKind :: Unnamed
Original file line number Diff line number Diff line change @@ -289,6 +289,7 @@ fn test_unix_datagram() {
289289
290290#[ test]
291291#[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
292+ #[ cfg_attr( target_os = "cygwin" , ignore) ] // Cygwin autobinds an address
292293fn test_unnamed_unix_datagram ( ) {
293294 let dir = tmpdir ( ) ;
294295 let path1 = dir. path ( ) . join ( "sock1" ) ;
@@ -307,6 +308,7 @@ fn test_unnamed_unix_datagram() {
307308
308309#[ test]
309310#[ 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
310312fn test_unix_datagram_connect_to_recv_addr ( ) {
311313 let dir = tmpdir ( ) ;
312314 let path1 = dir. path ( ) . join ( "sock1" ) ;
@@ -332,6 +334,7 @@ fn test_unix_datagram_connect_to_recv_addr() {
332334
333335#[ test]
334336#[ cfg_attr( target_os = "android" , ignore) ] // Android SELinux rules prevent creating Unix sockets
337+ #[ cfg_attr( target_os = "cygwin" , ignore) ] // Cygwin autobinds an address
335338fn test_connect_unix_datagram ( ) {
336339 let dir = tmpdir ( ) ;
337340 let path1 = dir. path ( ) . join ( "sock1" ) ;
You can’t perform that action at this time.
0 commit comments