Skip to content

Commit

Permalink
Rollup merge of rust-lang#122983 - taiki-e:bsd, r=workingjubilee
Browse files Browse the repository at this point in the history
Fix build failure on ARM/AArch64/PowerPC/RISC-V FreeBSD/NetBSD

Fixes rust-lang#121881 (comment)

Checked targets: aarch64-unknown-freebsd, powerpc64-unknown-freebsd, armv7-unknown-freebsd, riscv64gc-unknown-freebsd, aarch64-unknown-netbsd.

r? `@Amanieu`
cc `@devnexen`
  • Loading branch information
matthiaskrgr authored Mar 24, 2024
2 parents 40dfa12 + 7aa76a7 commit 2c23250
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/unix/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ impl Socket {
const AF_NAME_MAX: usize = 16;
let mut buf = [0; AF_NAME_MAX];
for (src, dst) in name.to_bytes().iter().zip(&mut buf[..AF_NAME_MAX - 1]) {
*dst = *src as i8;
*dst = *src as libc::c_char;
}
let mut arg: libc::accept_filter_arg = unsafe { mem::zeroed() };
arg.af_name = buf;
Expand Down

0 comments on commit 2c23250

Please sign in to comment.