Date: Mon, 12 Oct 2020 10:49:50 +0000 (UTC) From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r552121 - in head/net-mgmt/bandwhich: . files Message-ID: <202010121049.09CAnoNC072439@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pkubaj Date: Mon Oct 12 10:49:50 2020 New Revision: 552121 URL: https://svnweb.freebsd.org/changeset/ports/552121 Log: net-mgmt/bandwhich: fix build on powerpc and arm architectures chars are unsigned on arm and ppc. Added: head/net-mgmt/bandwhich/files/extra-patch-cargo-crates_pnet__datalink-0.26.0_src_bpf.rs (contents, props changed) Modified: head/net-mgmt/bandwhich/Makefile Modified: head/net-mgmt/bandwhich/Makefile ============================================================================== --- head/net-mgmt/bandwhich/Makefile Mon Oct 12 10:45:12 2020 (r552120) +++ head/net-mgmt/bandwhich/Makefile Mon Oct 12 10:49:50 2020 (r552121) @@ -264,6 +264,12 @@ CARGO_USE_GITHUB= yes 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 Added: head/net-mgmt/bandwhich/files/extra-patch-cargo-crates_pnet__datalink-0.26.0_src_bpf.rs ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/bandwhich/files/extra-patch-cargo-crates_pnet__datalink-0.26.0_src_bpf.rs Mon Oct 12 10:49:50 2020 (r552121) @@ -0,0 +1,11 @@ +--- cargo-crates/pnet_datalink-0.26.0/src/bpf.rs.orig 2020-10-11 18:58:25 UTC ++++ cargo-crates/pnet_datalink-0.26.0/src/bpf.rs +@@ -130,7 +130,7 @@ pub fn channel(network_interface: &NetworkInterface, c + } + 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; + } + + let buflen = config.read_buffer_size as libc::c_uint;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010121049.09CAnoNC072439>