net/sendme: fix build on non-x86
The netdev crate has the value of ioctl SIOCGIFXMEDIA hardcoded for x86. Add definitions for other architectures to fix the build. See also: https://github.com/shellrow/netdev/issues/170 Approved by: portmgr (build fix blanket) MFH: 2026Q2
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
--- cargo-crates/netdev-0.43.0/src/os/unix/link_speed.rs.orig 2026-06-13 11:15:27 UTC
|
||||
+++ cargo-crates/netdev-0.43.0/src/os/unix/link_speed.rs
|
||||
@@ -105,13 +105,16 @@ const SIOCGIFXMEDIA: u64 = 0xc02c6948;
|
||||
// #define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq)
|
||||
// const SIOCGIFMEDIA: u64 = 0xc02c6938;
|
||||
|
||||
-#[cfg(all(target_os = "freebsd", target_arch = "x86_64"))]
|
||||
+#[cfg(all(target_os = "freebsd", any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64le")))]
|
||||
// https://github.com/freebsd/freebsd-src/blob/master/sys/sys/sockio.h#L139
|
||||
// #define SIOCGIFXMEDIA _IOWR('i', 139, struct ifmediareq)
|
||||
const SIOCGIFXMEDIA: u64 = 0xc030698b;
|
||||
|
||||
#[cfg(all(target_os = "freebsd", target_arch = "x86"))]
|
||||
const SIOCGIFXMEDIA: u32 = 0xc030698b;
|
||||
+
|
||||
+#[cfg(all(target_os = "freebsd", target_arch = "arm"))]
|
||||
+const SIOCGIFXMEDIA: u32 = 0xc028698b;
|
||||
|
||||
#[cfg(any(target_os = "openbsd", target_os = "netbsd"))]
|
||||
// OpenBSD and netbsd don't define SIOCGIFXMEDIA.
|
||||
Reference in New Issue
Block a user