From 4309e64b626727a6a9f60a71254b911bf7a455ca Mon Sep 17 00:00:00 2001 From: Sebastian Urban Date: Wed, 3 Apr 2024 21:51:24 +0200 Subject: [PATCH] FreeBSD: accept *const i8/u8 for strlen arg Attempt to fix build on aarch64. --- src/target/unix/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/unix/mod.rs b/src/target/unix/mod.rs index 47a3a42..0e22988 100644 --- a/src/target/unix/mod.rs +++ b/src/target/unix/mod.rs @@ -72,7 +72,7 @@ impl NetworkInterfaceConfig for NetworkInterface { /// Retrieves the network interface name fn make_netifa_name(netifa: &libc::ifaddrs) -> Result { let data = netifa.ifa_name as *mut u8; - let len = unsafe { strlen(data as *const i8) }; + let len = unsafe { strlen(data as *const _) }; let bytes_slice = unsafe { from_raw_parts(data, len) }; let string = String::from_utf8(bytes_slice.to_vec()).map_err(Error::from)?;