From a77616ddf8fce7215106cf8786d0830da7963d59 Mon Sep 17 00:00:00 2001 From: Ruediger Klaehn Date: Mon, 15 Jun 2026 11:32:32 +0300 Subject: [PATCH 1/2] Extend support to aarch64 and riscv64 --- netwatch/src/interfaces/bsd/freebsd.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/netwatch/src/interfaces/bsd/freebsd.rs b/netwatch/src/interfaces/bsd/freebsd.rs index 6be6d523..79578f21 100644 --- a/netwatch/src/interfaces/bsd/freebsd.rs +++ b/netwatch/src/interfaces/bsd/freebsd.rs @@ -203,9 +203,17 @@ mod arm { } // Hardcoded based on the generated values here: https://cs.opensource.google/go/x/net/+/master:route/zsys_freebsd_arm.go -#[cfg(target_arch = "aarch64")] +#[cfg(any( + target_arch = "aarch64", + target_arch = "powerpc64", + target_arch = "riscv64" +))] pub use self::arm64::*; -#[cfg(target_arch = "aarch64")] +#[cfg(any( + target_arch = "aarch64", + target_arch = "powerpc64", + target_arch = "riscv64" +))] mod arm64 { pub const SIZEOF_IF_MSGHDRL_FREE_BSD10: usize = 0xb0; pub const SIZEOF_IFA_MSGHDR_FREE_BSD10: usize = 0x14; From cbed3d2e069c9001303a6dc0f62d3c384e514b7d Mon Sep 17 00:00:00 2001 From: Ruediger Klaehn Date: Mon, 15 Jun 2026 11:35:55 +0300 Subject: [PATCH 2/2] Rename module from arm64 to lp64, since it is no longer just for arm64 but for several architectures that have the lp64 data model. https://archive.opengroup.org/public/tech/aspen/lp64_wp.htm --- netwatch/src/interfaces/bsd/freebsd.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/netwatch/src/interfaces/bsd/freebsd.rs b/netwatch/src/interfaces/bsd/freebsd.rs index 79578f21..600ddb46 100644 --- a/netwatch/src/interfaces/bsd/freebsd.rs +++ b/netwatch/src/interfaces/bsd/freebsd.rs @@ -208,13 +208,13 @@ mod arm { target_arch = "powerpc64", target_arch = "riscv64" ))] -pub use self::arm64::*; +pub use self::lp64::*; #[cfg(any( target_arch = "aarch64", target_arch = "powerpc64", target_arch = "riscv64" ))] -mod arm64 { +mod lp64 { pub const SIZEOF_IF_MSGHDRL_FREE_BSD10: usize = 0xb0; pub const SIZEOF_IFA_MSGHDR_FREE_BSD10: usize = 0x14; pub const SIZEOF_IFA_MSGHDRL_FREE_BSD10: usize = 0xb0;