Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/os/unix/link_speed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,19 @@ const SIOCGIFXMEDIA: u64 = 0xc030698b;
#[cfg(all(target_os = "freebsd", target_arch = "x86"))]
const SIOCGIFXMEDIA: u32 = 0xc030698b;

#[cfg(all(target_os = "freebsd", target_arch = "arm"))]
// FreeBSD armv7 uses a 64-bit time_t and has a distinct ioctl value from i386.
const SIOCGIFXMEDIA: u32 = 0xc028698b;

#[cfg(all(
target_os = "freebsd",
not(target_pointer_width = "64"),
not(target_arch = "x86"),
not(target_arch = "arm")
))]
// Fallback for unknown 32-bit FreeBSD architectures to keep builds working.
const SIOCGIFXMEDIA: u32 = 0xc028698b;

#[cfg(any(target_os = "openbsd", target_os = "netbsd"))]
// OpenBSD and netbsd don't define SIOCGIFXMEDIA.
// Still using SIOCGIFXMEDIA as the variable name here.
Expand Down
Loading