1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

net-mgmt/bandwhich: generalize char handling

This commit is contained in:
Piotr Kubaj 2022-04-25 14:12:42 +00:00
parent e219a4758d
commit 1e2e95f6d6
2 changed files with 1 additions and 7 deletions

View File

@ -262,12 +262,6 @@ CARGO_CRATES= adler-0.2.3 \
PLIST_FILES= bin/bandwhich \
man/man1/bandwhich.1.gz
.include <bsd.port.options.mk>
.if ${ARCH} == aarch64 || ${ARCH:Marmv*} || ${ARCH:Mpowerpc*}
EXTRA_PATCHES= ${FILESDIR}/extra-patch-cargo-crates_pnet__datalink-0.26.0_src_bpf.rs
.endif
post-install:
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/bandwhich
${INSTALL_MAN} ${WRKSRC}/docs/bandwhich.1 ${STAGEDIR}${MAN1PREFIX}/man/man1

View File

@ -5,7 +5,7 @@
let mut iface: bpf::ifreq = unsafe { mem::zeroed() };
for (i, c) in network_interface.name.bytes().enumerate() {
- iface.ifr_name[i] = c as i8;
+ iface.ifr_name[i] = c as u8;
+ iface.ifr_name[i] = c as libc::c_char;
}
let buflen = config.read_buffer_size as libc::c_uint;