@@ -11,7 +11,7 @@ use std::io::{self, Read, Write};
1111#[ cfg( not( any( target_os = "redox" , target_os = "wasi" , target_os = "horizon" ) ) ) ]
1212use std:: io:: { IoSlice , IoSliceMut } ;
1313use std:: mem:: MaybeUninit ;
14- #[ cfg( not( target_os = "nto" ) ) ]
14+ #[ cfg( not( any ( target_os = "nto" , target_os = "nuttx" ) ) ) ]
1515use std:: net:: Ipv6Addr ;
1616use std:: net:: { self , Ipv4Addr , Shutdown } ;
1717#[ cfg( any( unix, all( target_os = "wasi" , not( target_env = "p1" ) ) ) ) ]
@@ -785,6 +785,7 @@ fn set_common_flags(socket: Socket) -> io::Result<Socket> {
785785 target_os = "netbsd" ,
786786 target_os = "openbsd" ,
787787 target_os = "espidf" ,
788+ target_os = "nuttx" ,
788789 target_os = "vita" ,
789790 target_os = "cygwin" ,
790791 ) )
@@ -835,6 +836,7 @@ fn set_common_accept_flags(socket: Socket) -> io::Result<Socket> {
835836 target_os = "netbsd" ,
836837 target_os = "openbsd" ,
837838 target_os = "espidf" ,
839+ target_os = "nuttx" ,
838840 target_os = "vita" ,
839841 target_os = "cygwin" ,
840842 ) )
@@ -1214,6 +1216,7 @@ impl Socket {
12141216 not( any(
12151217 target_os = "redox" ,
12161218 target_os = "espidf" ,
1219+ target_os = "nuttx" ,
12171220 target_os = "wasi" ,
12181221 target_os = "horizon"
12191222 ) )
@@ -1245,6 +1248,7 @@ impl Socket {
12451248 not( any(
12461249 target_os = "redox" ,
12471250 target_os = "espidf" ,
1251+ target_os = "nuttx" ,
12481252 target_os = "wasi" ,
12491253 target_os = "horizon"
12501254 ) )
@@ -1686,6 +1690,7 @@ impl Socket {
16861690 target_os = "haiku" ,
16871691 target_os = "nto" ,
16881692 target_os = "espidf" ,
1693+ target_os = "nuttx" ,
16891694 target_os = "vita" ,
16901695 target_os = "cygwin" ,
16911696 target_os = "wasi" ,
@@ -1720,6 +1725,7 @@ impl Socket {
17201725 target_os = "haiku" ,
17211726 target_os = "nto" ,
17221727 target_os = "espidf" ,
1728+ target_os = "nuttx" ,
17231729 target_os = "vita" ,
17241730 target_os = "cygwin" ,
17251731 target_os = "wasi" ,
@@ -1763,6 +1769,7 @@ impl Socket {
17631769 not( any(
17641770 target_os = "redox" ,
17651771 target_os = "espidf" ,
1772+ target_os = "nuttx" ,
17661773 target_os = "openbsd" ,
17671774 target_os = "freebsd" ,
17681775 target_os = "dragonfly" ,
@@ -1795,6 +1802,7 @@ impl Socket {
17951802 not( any(
17961803 target_os = "redox" ,
17971804 target_os = "espidf" ,
1805+ target_os = "nuttx" ,
17981806 target_os = "openbsd" ,
17991807 target_os = "freebsd" ,
18001808 target_os = "dragonfly" ,
@@ -1864,7 +1872,7 @@ impl Socket {
18641872 /// This function specifies a new multicast group for this socket to join.
18651873 /// The address must be a valid multicast address, and `interface` is the
18661874 /// index of the interface to join/leave (or 0 to indicate any interface).
1867- #[ cfg( not( target_os = "nto" ) ) ]
1875+ #[ cfg( not( any ( target_os = "nto" , target_os = "nuttx" ) ) ) ]
18681876 pub fn join_multicast_v6 ( & self , multiaddr : & Ipv6Addr , interface : u32 ) -> io:: Result < ( ) > {
18691877 let mreq = sys:: Ipv6Mreq {
18701878 ipv6mr_multiaddr : sys:: to_in6_addr ( multiaddr) ,
@@ -1888,7 +1896,7 @@ impl Socket {
18881896 /// For more information about this option, see [`join_multicast_v6`].
18891897 ///
18901898 /// [`join_multicast_v6`]: Socket::join_multicast_v6
1891- #[ cfg( not( target_os = "nto" ) ) ]
1899+ #[ cfg( not( any ( target_os = "nto" , target_os = "nuttx" ) ) ) ]
18921900 pub fn leave_multicast_v6 ( & self , multiaddr : & Ipv6Addr , interface : u32 ) -> io:: Result < ( ) > {
18931901 let mreq = sys:: Ipv6Mreq {
18941902 ipv6mr_multiaddr : sys:: to_in6_addr ( multiaddr) ,
@@ -2098,6 +2106,7 @@ impl Socket {
20982106 target_os = "haiku" ,
20992107 target_os = "hurd" ,
21002108 target_os = "espidf" ,
2109+ target_os = "nuttx" ,
21012110 target_os = "vita" ,
21022111 target_os = "wasi" ,
21032112 target_os = "horizon"
@@ -2125,6 +2134,7 @@ impl Socket {
21252134 target_os = "haiku" ,
21262135 target_os = "hurd" ,
21272136 target_os = "espidf" ,
2137+ target_os = "nuttx" ,
21282138 target_os = "vita" ,
21292139 target_os = "wasi" ,
21302140 target_os = "horizon"
0 commit comments