mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-09-01 09:13:48 +00:00
threadshare: Fix compatibility with getifaddrs 0.5
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2515>
This commit is contained in:
parent
ac86e0590e
commit
8ba691f085
1 changed files with 6 additions and 4 deletions
|
@ -25,7 +25,6 @@ pub mod imp {
|
|||
use libc::ip_mreq;
|
||||
|
||||
#[cfg(any(target_os = "solaris", target_os = "illumos", target_os = "macos"))]
|
||||
use std::net::IpAddr;
|
||||
use std::net::Ipv4Addr;
|
||||
|
||||
/// Join multicast address for a given interface.
|
||||
|
@ -204,9 +203,12 @@ pub mod imp {
|
|||
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
let ip_addr = match iface.address {
|
||||
IpAddr::V4(ipv4_addr) => ipv4_addr,
|
||||
IpAddr::V6(_) => return Err(io::Error::other("Interface address is IPv6")),
|
||||
use getifaddrs::Address;
|
||||
|
||||
let ip_addr = match &iface.address {
|
||||
Address::V4(ifaddr) => ifaddr.address,
|
||||
Address::V6(_) => return Err(io::Error::other("Interface address is IPv6")),
|
||||
Address::Mac(_) => return Err(io::Error::other("Interface address is Mac")),
|
||||
};
|
||||
|
||||
let mreq = ip_mreq {
|
||||
|
|
Loading…
Reference in a new issue