Skip to content

Commit 6dd604f

Browse files
committed
Foundation: drop acceptConnectionInBackgroundAndNotify on Windows
`acceptConnectionInBackgroundAndNotify(forModes:)` is already unavailable on Windows. This makes the helper functional also unavailable on Windows as `SOCKET` is not a `FileHandle` on Windows.
1 parent 6787b8a commit 6dd604f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/Foundation/FileHandle.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,8 +939,13 @@ extension FileHandle {
939939
}
940940
}
941941

942+
@available(Windows, unavailable, message: "A SOCKET cannot be treated as a fd")
942943
open func acceptConnectionInBackgroundAndNotify() {
944+
#if os(Windows)
945+
NSUnsupported()
946+
#else
943947
acceptConnectionInBackgroundAndNotify(forModes: [.default])
948+
#endif
944949
}
945950

946951
@available(Windows, unavailable, message: "A SOCKET cannot be treated as a fd")

0 commit comments

Comments
 (0)