Skip to content

Commit

Permalink
fix unix typedef
Browse files Browse the repository at this point in the history
  • Loading branch information
Gankra committed Mar 30, 2022
1 parent 37d4753 commit e3a3afe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/os/unix/net/addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mod libc {
fn sun_path_offset(addr: &libc::sockaddr_un) -> usize {
// Work with an actual instance of the type since using a null pointer is UB
let base = (addr as *const libc::sockaddr_un).addr();
let path = (&addr.sun_path as *const i8).addr();
let path = (&addr.sun_path as *const libc::c_char).addr();
path - base
}

Expand Down

0 comments on commit e3a3afe

Please sign in to comment.