From 418405bd4d0b382aa0307ccf3005c7250021f3f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 29 Aug 2025 09:33:27 +0300 Subject: [PATCH] threadshare: Fix build on non-Solaris/Darwin UNIXes Part-of: --- generic/threadshare/src/net.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/generic/threadshare/src/net.rs b/generic/threadshare/src/net.rs index f48ddf698..e6300b8ef 100644 --- a/generic/threadshare/src/net.rs +++ b/generic/threadshare/src/net.rs @@ -68,7 +68,11 @@ use getifaddrs::Interface; pub mod imp { use super::*; - use std::{io, mem, net::UdpSocket, os::unix::io::AsRawFd}; + use std::{ + io, mem, + net::{Ipv4Addr, UdpSocket}, + os::unix::io::AsRawFd, + }; use libc::{ in_addr, ip_mreqn, setsockopt, IPPROTO_IP, IP_ADD_MEMBERSHIP, IP_DROP_MEMBERSHIP, @@ -78,14 +82,6 @@ pub mod imp { #[cfg(any(target_os = "macos", target_os = "ios"))] use libc::ip_mreq; - #[cfg(any( - target_os = "solaris", - target_os = "illumos", - target_os = "macos", - target_os = "ios" - ))] - use std::net::Ipv4Addr; - /// Join multicast address for a given interface. pub fn join_multicast_v4( socket: &UdpSocket,