fix unix typedef
This commit is contained in:
parent
37d4753776
commit
e3a3afe050
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ mod libc {
|
||||||
fn sun_path_offset(addr: &libc::sockaddr_un) -> usize {
|
fn sun_path_offset(addr: &libc::sockaddr_un) -> usize {
|
||||||
// Work with an actual instance of the type since using a null pointer is UB
|
// 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 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
|
path - base
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue