mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-04 02:33:51 +00:00
threadshare: Fix build on non-Solaris/Darwin UNIXes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2523>
This commit is contained in:
parent
16230c7b3a
commit
418405bd4d
1 changed files with 5 additions and 9 deletions
|
@ -68,7 +68,11 @@ use getifaddrs::Interface;
|
||||||
pub mod imp {
|
pub mod imp {
|
||||||
use super::*;
|
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::{
|
use libc::{
|
||||||
in_addr, ip_mreqn, setsockopt, IPPROTO_IP, IP_ADD_MEMBERSHIP, IP_DROP_MEMBERSHIP,
|
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"))]
|
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
||||||
use libc::ip_mreq;
|
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.
|
/// Join multicast address for a given interface.
|
||||||
pub fn join_multicast_v4(
|
pub fn join_multicast_v4(
|
||||||
socket: &UdpSocket,
|
socket: &UdpSocket,
|
||||||
|
|
Loading…
Reference in a new issue