Skip to content

Commit 7b476d8

Browse files
committed
Remove target_os, which does not have MSG_CMSG_CLOEXEC constant in libc
1 parent db902bc commit 7b476d8

File tree

4 files changed

+31
-54
lines changed

4 files changed

+31
-54
lines changed

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

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@ use crate::sys::unix::ext::net::addr::{sockaddr_un, SocketAddr};
99
target_os = "dragonfly",
1010
target_os = "emscripten",
1111
target_os = "freebsd",
12-
target_os = "fuchsia",
13-
target_os = "haiku",
14-
target_os = "illumos",
15-
target_os = "ios",
1612
target_os = "linux",
17-
target_os = "macos",
1813
target_os = "netbsd",
1914
target_os = "openbsd",
20-
target_os = "solaris",
2115
target_env = "uclibc",
2216
))]
2317
use crate::sys::unix::ext::net::ancillary::{
@@ -367,15 +361,9 @@ impl UnixDatagram {
367361
target_os = "dragonfly",
368362
target_os = "emscripten",
369363
target_os = "freebsd",
370-
target_os = "fuchsia",
371-
target_os = "haiku",
372-
target_os = "illumos",
373-
target_os = "ios",
374364
target_os = "linux",
375-
target_os = "macos",
376365
target_os = "netbsd",
377366
target_os = "openbsd",
378-
target_os = "solaris",
379367
target_env = "uclibc",
380368
))]
381369
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
@@ -431,15 +419,9 @@ impl UnixDatagram {
431419
target_os = "dragonfly",
432420
target_os = "emscripten",
433421
target_os = "freebsd",
434-
target_os = "fuchsia",
435-
target_os = "haiku",
436-
target_os = "illumos",
437-
target_os = "ios",
438422
target_os = "linux",
439-
target_os = "macos",
440423
target_os = "netbsd",
441424
target_os = "openbsd",
442-
target_os = "solaris",
443425
target_env = "uclibc",
444426
))]
445427
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
@@ -539,6 +521,16 @@ impl UnixDatagram {
539521
/// Ok(())
540522
/// }
541523
/// ```
524+
#[cfg(any(
525+
target_os = "android",
526+
target_os = "dragonfly",
527+
target_os = "emscripten",
528+
target_os = "freebsd",
529+
target_os = "linux",
530+
target_os = "netbsd",
531+
target_os = "openbsd",
532+
target_env = "uclibc",
533+
))]
542534
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
543535
pub fn send_vectored_with_ancillary_to<P: AsRef<Path>>(
544536
&self,
@@ -578,6 +570,16 @@ impl UnixDatagram {
578570
/// Ok(())
579571
/// }
580572
/// ```
573+
#[cfg(any(
574+
target_os = "android",
575+
target_os = "dragonfly",
576+
target_os = "emscripten",
577+
target_os = "freebsd",
578+
target_os = "linux",
579+
target_os = "netbsd",
580+
target_os = "openbsd",
581+
target_env = "uclibc",
582+
))]
581583
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
582584
pub fn send_vectored_with_ancillary(
583585
&self,

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,9 @@ mod addr;
88
target_os = "dragonfly",
99
target_os = "emscripten",
1010
target_os = "freebsd",
11-
target_os = "fuchsia",
12-
target_os = "haiku",
13-
target_os = "illumos",
14-
target_os = "ios",
1511
target_os = "linux",
16-
target_os = "macos",
1712
target_os = "netbsd",
1813
target_os = "openbsd",
19-
target_os = "solaris",
2014
target_env = "uclibc",
2115
)))]
2216
#[cfg(any(
@@ -25,15 +19,9 @@ mod addr;
2519
target_os = "dragonfly",
2620
target_os = "emscripten",
2721
target_os = "freebsd",
28-
target_os = "fuchsia",
29-
target_os = "haiku",
30-
target_os = "illumos",
31-
target_os = "ios",
3222
target_os = "linux",
33-
target_os = "macos",
3423
target_os = "netbsd",
3524
target_os = "openbsd",
36-
target_os = "solaris",
3725
target_env = "uclibc",
3826
))]
3927
mod ancillary;
@@ -51,15 +39,9 @@ pub use self::addr::*;
5139
target_os = "dragonfly",
5240
target_os = "emscripten",
5341
target_os = "freebsd",
54-
target_os = "fuchsia",
55-
target_os = "haiku",
56-
target_os = "illumos",
57-
target_os = "ios",
5842
target_os = "linux",
59-
target_os = "macos",
6043
target_os = "netbsd",
6144
target_os = "openbsd",
62-
target_os = "solaris",
6345
target_env = "uclibc",
6446
))]
6547
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,9 @@ use crate::sys::unix::ext::net::addr::{sockaddr_un, SocketAddr};
2121
target_os = "dragonfly",
2222
target_os = "emscripten",
2323
target_os = "freebsd",
24-
target_os = "fuchsia",
25-
target_os = "haiku",
26-
target_os = "illumos",
27-
target_os = "ios",
2824
target_os = "linux",
29-
target_os = "macos",
3025
target_os = "netbsd",
3126
target_os = "openbsd",
32-
target_os = "solaris",
3327
target_env = "uclibc",
3428
))]
3529
use crate::sys::unix::ext::net::ancillary::{
@@ -539,15 +533,9 @@ impl UnixStream {
539533
target_os = "dragonfly",
540534
target_os = "emscripten",
541535
target_os = "freebsd",
542-
target_os = "fuchsia",
543-
target_os = "haiku",
544-
target_os = "illumos",
545-
target_os = "ios",
546536
target_os = "linux",
547-
target_os = "macos",
548537
target_os = "netbsd",
549538
target_os = "openbsd",
550-
target_os = "solaris",
551539
target_env = "uclibc",
552540
))]
553541
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]
@@ -595,15 +583,9 @@ impl UnixStream {
595583
target_os = "dragonfly",
596584
target_os = "emscripten",
597585
target_os = "freebsd",
598-
target_os = "fuchsia",
599-
target_os = "haiku",
600-
target_os = "illumos",
601-
target_os = "ios",
602586
target_os = "linux",
603-
target_os = "macos",
604587
target_os = "netbsd",
605588
target_os = "openbsd",
606-
target_os = "solaris",
607589
target_env = "uclibc",
608590
))]
609591
#[unstable(feature = "unix_socket_ancillary_data", issue = "76915")]

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,17 @@ fn test_send_vectored_with_ancillary_to_unix_datagram() {
557557
}
558558
}
559559

560+
#[cfg(any(
561+
doc,
562+
target_os = "android",
563+
target_os = "dragonfly",
564+
target_os = "emscripten",
565+
target_os = "freebsd",
566+
target_os = "linux",
567+
target_os = "netbsd",
568+
target_os = "openbsd",
569+
target_env = "uclibc",
570+
))]
560571
#[test]
561572
fn test_send_vectored_with_ancillary_unix_datagram() {
562573
let dir = tmpdir();

0 commit comments

Comments
 (0)