git: df44f6ef5594 - 2026Q2 - net/sendme: fix build on non-x86
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 13 Jun 2026 20:25:29 UTC
The branch 2026Q2 has been updated by fuz:
URL: https://cgit.FreeBSD.org/ports/commit/?id=df44f6ef559452d00fee1f3600e1172aea7b6ac3
commit df44f6ef559452d00fee1f3600e1172aea7b6ac3
Author: Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2026-06-13 11:26:17 +0000
Commit: Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2026-06-13 20:25:11 +0000
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
(cherry picked from commit d4de8e372e2e8f829afe06d2ea4aa8528d2d96d2)
---
...o-crates_netdev-0.43.0_src_os_unix_link__speed.rs | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
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.