Skip to content

Commit 4e316ae

Browse files
authored
Enable msghdr functions on Redox (#1536)
1 parent 37da140 commit 4e316ae

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

src/backend/libc/net/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ pub(crate) mod ext;
44
windows,
55
target_os = "espidf",
66
target_os = "horizon",
7-
target_os = "redox",
87
target_os = "vita"
98
)))]
109
pub(crate) mod msghdr;

src/backend/libc/net/msghdr.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use core::mem::zeroed;
1616
not(any(windows, target_os = "espidf", target_os = "wasi")),
1717
any(
1818
target_os = "android",
19+
target_os = "redox",
1920
all(
2021
target_os = "linux",
2122
not(target_env = "musl"),
@@ -30,15 +31,10 @@ fn msg_iov_len(len: usize) -> c::size_t {
3031

3132
/// Convert the value to the `msg_iovlen` field of a `msghdr` struct.
3233
#[cfg(all(
33-
not(any(
34-
windows,
35-
target_os = "espidf",
36-
target_os = "redox",
37-
target_os = "vita",
38-
target_os = "wasi"
39-
)),
34+
not(any(windows, target_os = "espidf", target_os = "vita", target_os = "wasi")),
4035
not(any(
4136
target_os = "android",
37+
target_os = "redox",
4238
all(
4339
target_os = "linux",
4440
not(target_env = "musl"),
@@ -83,7 +79,6 @@ fn msg_control_len(len: usize) -> c::socklen_t {
8379
target_os = "haiku",
8480
target_os = "hurd",
8581
target_os = "nto",
86-
target_os = "redox",
8782
target_os = "vita",
8883
target_os = "wasi",
8984
)))]
@@ -179,7 +174,7 @@ pub(crate) unsafe fn with_msghdr<R>(
179174
}
180175

181176
/// Create a zero-initialized message header struct value.
182-
#[cfg(all(unix, not(target_os = "redox")))]
177+
#[cfg(unix)]
183178
pub(crate) fn zero_msghdr() -> c::msghdr {
184179
// SAFETY: We can't initialize all the fields by value because on some
185180
// platforms the `msghdr` struct in the libc crate contains private padding

src/backend/libc/net/syscalls.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use core::ptr::null_mut;
2121
windows,
2222
target_os = "espidf",
2323
target_os = "horizon",
24-
target_os = "redox",
2524
target_os = "vita"
2625
)))]
2726
use {
@@ -187,7 +186,6 @@ pub(crate) fn accept(sockfd: BorrowedFd<'_>) -> io::Result<OwnedFd> {
187186
windows,
188187
target_os = "espidf",
189188
target_os = "horizon",
190-
target_os = "redox",
191189
target_os = "vita"
192190
)))]
193191
pub(crate) fn recvmsg(
@@ -222,7 +220,6 @@ pub(crate) fn recvmsg(
222220
windows,
223221
target_os = "espidf",
224222
target_os = "horizon",
225-
target_os = "redox",
226223
target_os = "vita"
227224
)))]
228225
pub(crate) fn sendmsg(
@@ -245,7 +242,6 @@ pub(crate) fn sendmsg(
245242
windows,
246243
target_os = "espidf",
247244
target_os = "horizon",
248-
target_os = "redox",
249245
target_os = "vita"
250246
)))]
251247
pub(crate) fn sendmsg_addr(

src/net/send_recv/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ pub use backend::net::send_recv::{RecvFlags, ReturnFlags, SendFlags};
1515
windows,
1616
target_os = "espidf",
1717
target_os = "horizon",
18-
target_os = "redox",
1918
target_os = "vita"
2019
)))]
2120
mod msg;
@@ -24,7 +23,6 @@ mod msg;
2423
windows,
2524
target_os = "espidf",
2625
target_os = "horizon",
27-
target_os = "redox",
2826
target_os = "vita"
2927
)))]
3028
pub use msg::*;

0 commit comments

Comments
 (0)