Skip to content

Commit 4b2974b

Browse files
authored
mdns: allow reuse_port on non-Unix platforms when feature is enabled (#702)
Change conditional compilation from requiring both unix target family and reuse_port feature to allowing either condition. Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
1 parent ad3173b commit 4b2974b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mdns/src/conn/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ impl DnsConn {
5858
Some(socket2::Protocol::UDP),
5959
)?;
6060

61-
#[cfg(feature = "reuse_port")]
62-
#[cfg(target_family = "unix")]
61+
#[cfg(all(target_family = "unix", feature = "reuse_port"))]
6362
socket.set_reuse_port(true)?;
6463

6564
socket.set_reuse_address(true)?;

0 commit comments

Comments
 (0)