Skip to content

Commit

Permalink
Update windows-sys 0.59
Browse files Browse the repository at this point in the history
  • Loading branch information
Berrysoft committed Sep 7, 2024
1 parent 3a93893 commit 678a292
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ features = ["all"]
libc = "0.2.150"

[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.52"
version = "0.59"
features = [
"Win32_Foundation",
"Win32_Networking_WinSock",
Expand Down
3 changes: 2 additions & 1 deletion src/sys/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,8 @@ pub(crate) fn unix_sockaddr(path: &Path) -> io::Result<SockAddr> {
storage.sun_family = crate::sys::AF_UNIX as sa_family_t;
// `storage` was initialized to zero above, so the path is
// already null terminated.
storage.sun_path[..bytes.len()].copy_from_slice(bytes);
storage.sun_path[..bytes.len()]
.copy_from_slice(unsafe { mem::transmute::<&[u8], &[i8]>(bytes) });

let base = storage as *const _ as usize;
let path = &storage.sun_path as *const _ as usize;
Expand Down

0 comments on commit 678a292

Please sign in to comment.