Skip to content

Commit a5852ef

Browse files
authored
Rollup merge of #122983 - taiki-e:bsd, r=workingjubilee
Fix build failure on ARM/AArch64/PowerPC/RISC-V FreeBSD/NetBSD Fixes #121881 (comment) Checked targets: aarch64-unknown-freebsd, powerpc64-unknown-freebsd, armv7-unknown-freebsd, riscv64gc-unknown-freebsd, aarch64-unknown-netbsd. r? ``@Amanieu`` cc ``@devnexen``
2 parents 6b1f4e4 + 7aa76a7 commit a5852ef

File tree

1 file changed

+1
-1
lines changed
  • library/std/src/sys/pal/unix

1 file changed

+1
-1
lines changed

library/std/src/sys/pal/unix/net.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ impl Socket {
459459
const AF_NAME_MAX: usize = 16;
460460
let mut buf = [0; AF_NAME_MAX];
461461
for (src, dst) in name.to_bytes().iter().zip(&mut buf[..AF_NAME_MAX - 1]) {
462-
*dst = *src as i8;
462+
*dst = *src as libc::c_char;
463463
}
464464
let mut arg: libc::accept_filter_arg = unsafe { mem::zeroed() };
465465
arg.af_name = buf;

0 commit comments

Comments
 (0)