We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91d5e4a commit 7a878eaCopy full SHA for 7a878ea
library/std/src/sys/pal/unix/net.rs
@@ -74,7 +74,6 @@ impl Socket {
74
if #[cfg(any(
75
target_os = "android",
76
target_os = "dragonfly",
77
- target_os = "freebsd",
78
target_os = "illumos",
79
target_os = "hurd",
80
target_os = "linux",
@@ -93,9 +92,9 @@ impl Socket {
93
92
fd.set_cloexec()?;
94
let socket = Socket(fd);
95
96
- // macOS and iOS use `SO_NOSIGPIPE` as a `setsockopt`
+ // macOS, iOS and FreeBSD use `SO_NOSIGPIPE` as a `setsockopt`
97
// flag to disable `SIGPIPE` emission on socket.
98
- #[cfg(target_vendor = "apple")]
+ #[cfg(any(target_vendor = "apple", target_os = "freebsd"))]
99
setsockopt(&socket, libc::SOL_SOCKET, libc::SO_NOSIGPIPE, 1)?;
100
101
Ok(socket)
0 commit comments