Skip to content

Commit 60e59ee

Browse files
nerditationThomasdezeeuw
authored andcommitted
windows-sys: use ADDRESS_FAMILY for sa_family_t
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 (#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`.
1 parent 77e3bb9 commit 60e59ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sys/windows.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub(crate) use windows_sys::Win32::Networking::WinSock::{
6161
SOCKADDR_STORAGE as sockaddr_storage,
6262
};
6363
#[allow(non_camel_case_types)]
64-
pub(crate) type sa_family_t = windows_sys::Win32::Networking::WinSock::sa_family_t;
64+
pub(crate) type sa_family_t = windows_sys::Win32::Networking::WinSock::ADDRESS_FAMILY;
6565
#[allow(non_camel_case_types)]
6666
pub(crate) type socklen_t = windows_sys::Win32::Networking::WinSock::socklen_t;
6767
// Used in `Socket`.

0 commit comments

Comments
 (0)