Skip to content

Commit 7aa76a7

Browse files
committed
Fix build failure on ARM/AArch64/PowerPC/RISC-V FreeBSD/NetBSD
1 parent 548e14b commit 7aa76a7

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

Diff for: 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)