Skip to content

Commit bc4e162

Browse files
committed
Fix net.rs.
1 parent 68c9626 commit bc4e162

File tree

1 file changed

+3
-3
lines changed
  • library/std/src/sys/unix

1 file changed

+3
-3
lines changed

library/std/src/sys/unix/net.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ impl Socket {
144144
}
145145
}
146146

147-
#[cfg(not(any(target_os = "freertos", target_os = "vxworks"))]
147+
#[cfg(not(any(target_os = "freertos", target_os = "vxworks")))]
148148
pub fn new_pair(fam: c_int, ty: c_int) -> io::Result<(Socket, Socket)> {
149149
unsafe {
150150
let mut fds = [0, 0];
@@ -174,7 +174,7 @@ impl Socket {
174174
}
175175
}
176176

177-
#[cfg(target_os = "vxworks")]
177+
#[cfg(any(target_os = "freertos", target_os = "vxworks"))]
178178
pub fn new_pair(_fam: c_int, _ty: c_int) -> io::Result<(Socket, Socket)> {
179179
unimplemented!()
180180
}
@@ -263,7 +263,7 @@ impl Socket {
263263
let fd = cvt_r(|| unsafe {
264264
netc::accept4(self.0.raw(), storage, len, netc::SOCK_CLOEXEC)
265265
})?;
266-
Ok(Socket(FileDesc::new(fd)))
266+
Ok(Socket(NetFileDesc::new(fd)))
267267
// While the Android kernel supports the syscall,
268268
// it is not included in all versions of Android's libc.
269269
} else if #[cfg(target_os = "android")] {

0 commit comments

Comments
 (0)