mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-01 09:13:48 +00:00
threadshare: Fix missing Darwin platform compatibility
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2515>
This commit is contained in:
parent
8ba691f085
commit
611bb49b40
1 changed files with 14 additions and 4 deletions
|
@ -21,10 +21,15 @@ pub mod imp {
|
|||
IP_MULTICAST_IF,
|
||||
};
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
||||
use libc::ip_mreq;
|
||||
|
||||
#[cfg(any(target_os = "solaris", target_os = "illumos", target_os = "macos"))]
|
||||
#[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.
|
||||
|
@ -53,7 +58,12 @@ pub mod imp {
|
|||
) -> Result<(), io::Error> {
|
||||
let index = iface.index.unwrap_or(0);
|
||||
|
||||
#[cfg(not(any(target_os = "solaris", target_os = "illumos", target_os = "macos")))]
|
||||
#[cfg(not(any(
|
||||
target_os = "solaris",
|
||||
target_os = "illumos",
|
||||
target_os = "macos",
|
||||
target_os = "ios"
|
||||
)))]
|
||||
{
|
||||
let group_op: i32 = if join {
|
||||
IP_ADD_MEMBERSHIP
|
||||
|
@ -201,7 +211,7 @@ pub mod imp {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
||||
{
|
||||
use getifaddrs::Address;
|
||||
|
||||
|
|
Loading…
Reference in a new issue