diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index e26e327d78..247cbe4d5e 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -290,12 +290,18 @@ libc_bitflags! { /// Additional socket options pub struct SockFlag: c_int { /// Set non-blocking mode on the new socket + /// + /// Note: macOS supports `NONBLOCK` through separate call to `fcntl`, + /// e.g. `nix::fcntl::fcntl(fd, F_SETFL(O_NONBLOCK))` #[cfg(any(linux_android, freebsdlike, netbsdlike, solarish))] SOCK_NONBLOCK; /// Set close-on-exec on the new descriptor + /// + /// Note: macOS supports `CLOEXEC` through separate call to `fcntl`, + /// e.g. `nix::fcntl::fcntl(fd, F_SETFL(O_CLOEXEC))` #[cfg(any(linux_android, freebsdlike, netbsdlike,