Skip to content

Commit 70fb1ec

Browse files
committed
setting errno doesn't work correctly on windows?
1 parent 462e463 commit 70fb1ec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

FlyingSocks/Tests/SocketErrorTests.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ struct SocketErrorTests {
5252

5353
@Test
5454
func socketError_makeFailed() {
55+
#if canImport(WinSDK)
56+
WSASetLastError(EIO)
57+
#else
5558
errno = EIO
59+
#endif
60+
5661
let socketError = SocketError.makeFailed("unit-test")
5762
switch socketError {
5863
case let .failed(type: type, errno: socketErrno, message: message):

0 commit comments

Comments
 (0)