From d4de8e372e2e8f829afe06d2ea4aa8528d2d96d2 Mon Sep 17 00:00:00 2001 From: Robert Clausecker Date: Sat, 13 Jun 2026 13:26:17 +0200 Subject: [PATCH] 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 --- ...s_netdev-0.43.0_src_os_unix_link__speed.rs | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 net/sendme/files/patch-cargo-crates_netdev-0.43.0_src_os_unix_link__speed.rs diff --git a/net/sendme/files/patch-cargo-crates_netdev-0.43.0_src_os_unix_link__speed.rs b/net/sendme/files/patch-cargo-crates_netdev-0.43.0_src_os_unix_link__speed.rs new file mode 100644 index 000000000000..382e7e55f78c --- /dev/null +++ b/net/sendme/files/patch-cargo-crates_netdev-0.43.0_src_os_unix_link__speed.rs @@ -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.