Skip to content

Commit

Permalink
windows-sys: use ADDRESS_FAMILY for sa_family_t
Browse files Browse the repository at this point in the history
originally Windows SDK didn't have a `sa_family_t` typedef, and we
requested `win32metadata` to add it (microsoft/win32metadata#1538)
and used that from `windows-sys` as our `sa_family_t` definition on
Windows platform (rust-lang#414), which was an oversight. after all, Winsock2
isn't compliant to Posix and has it's own naming scheme, and
`ADDRESS_FAMILY` is intended to be the equivalence of `sa_family_t`.
  • Loading branch information
nerditation authored and Thomasdezeeuw committed Aug 27, 2023
1 parent 77e3bb9 commit 60e59ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sys/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pub(crate) use windows_sys::Win32::Networking::WinSock::{
SOCKADDR_STORAGE as sockaddr_storage,
};
#[allow(non_camel_case_types)]
pub(crate) type sa_family_t = windows_sys::Win32::Networking::WinSock::sa_family_t;
pub(crate) type sa_family_t = windows_sys::Win32::Networking::WinSock::ADDRESS_FAMILY;
#[allow(non_camel_case_types)]
pub(crate) type socklen_t = windows_sys::Win32::Networking::WinSock::socklen_t;
// Used in `Socket`.
Expand Down

0 comments on commit 60e59ee

Please sign in to comment.