mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-01 09:13:48 +00:00
threadshare: Fix build on non-Solaris/Darwin UNIXes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2515>
This commit is contained in:
parent
611bb49b40
commit
2716e46593
1 changed files with 5 additions and 9 deletions
|
@ -14,7 +14,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,
|
||||
|
@ -24,14 +28,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,
|
||||
|
|
Loading…
Reference in a new issue