Skip to content

Commit

Permalink
WinSock::ADRESS_FAMILY is now u16.
Browse files Browse the repository at this point in the history
Since windows-sys-0.45.0,
`windows_sys::Win32::Networking::WinSock::ADDRESS_FAMILY` are u16 instead
of u32.
  • Loading branch information
chantra committed Oct 28, 2024
1 parent 42f54a1 commit afaadf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ impl Address {
return None;
}

match (*ptr).sa_family as u32 {
match (*ptr).sa_family as u16 {
WinSock::AF_INET => {
let ptr: *const WinSock::SOCKADDR_IN = std::mem::transmute(ptr);
let addr: [u8; 4] = ((*ptr).sin_addr.S_un.S_addr).to_ne_bytes();
Expand Down

0 comments on commit afaadf1

Please sign in to comment.