NIOCore: adjust the BSDSocketAPI for Windows (#2164)

Windows does not provide a definition for `socklen_t`.  Create an
internal typealias for it to provide source stability to the internal
interfaces.

Co-authored-by: George Barnett <gbarnett@apple.com>
Co-authored-by: Cory Benfield <lukasa@apple.com>
This commit is contained in:
authored and GitHub committed 2022-06-07 06:39:48 -07:00
1 parent b4e4f0211f
commit fae6522f6d
1 file changed
+2
+2
View File
@@ -57,6 +57,8 @@ import func WinSDK.inet_pton
import func WinSDK.GetLastError
import func WinSDK.WSAGetLastError
internal typealias socklen_t = ucrt.size_t
#elseif os(Linux) || os(Android)
import Glibc
import CNIOLinux