File tree Expand file tree Collapse file tree 3 files changed +3
-21
lines changed Expand file tree Collapse file tree 3 files changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -107,24 +107,6 @@ extension Socket {
107107 return addr
108108 }
109109
110- static func makeAbstractNamespaceUnix( name: String ) -> WinSDK . sockaddr_un {
111- var addr : sockaddr_un = WinSDK . sockaddr_un ( )
112- addr. sun_family = ADDRESS_FAMILY ( AF_UNIX)
113-
114- _ = withUnsafeMutableBytes ( of: & addr. sun_path) { raw in
115- raw. initializeMemory ( as: CChar . self, repeating: 0 )
116- }
117-
118- let nameBytes = Array ( name. utf8. prefix ( 107 ) )
119- nameBytes. withUnsafeBytes { src in
120- withUnsafeMutableBytes ( of: & addr. sun_path) { dst in
121- dst [ 1 ..< 1 + src. count] . copyBytes ( from: src)
122- }
123- }
124-
125- return addr
126- }
127-
128110 static func fcntl( _ fd: FileDescriptorType , _ cmd: Int32 ) -> Int32 {
129111 return - 1
130112 }
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ public extension SocketAddress where Self == sockaddr_un {
111111 Socket . makeAddressUnix ( path: path)
112112 }
113113
114- #if canImport(Glibc) || canImport(Musl) || canImport(Android) || canImport(WinSDK)
114+ #if canImport(Glibc) || canImport(Musl) || canImport(Android)
115115 static func unix( abstractNamespace: String ) -> Self {
116116 Socket . makeAbstractNamespaceUnix ( name: abstractNamespace)
117117 }
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ struct SocketAddressTests {
148148 )
149149 }
150150
151- #if canImport(Glibc) || canImport(Musl) || canImport(Android) || canImport(WinSDK)
151+ #if canImport(Glibc) || canImport(Musl) || canImport(Android)
152152 @Test
153153 func unixAbstractNamespace_IsCorrectlyDecodedFromStorage( ) throws {
154154 let storage = sockaddr_un
@@ -200,7 +200,7 @@ struct SocketAddressTests {
200200 )
201201 }
202202
203- #if canImport(Glibc) || canImport(Musl) || canImport(Android) || canImport(WinSDK)
203+ #if canImport(Glibc) || canImport(Musl) || canImport(Android)
204204 @Test
205205 func unixAbstractNamespace_CheckSize( ) throws {
206206 let sun = sockaddr_un. unix ( abstractNamespace: " some_great_namespace " )
You can’t perform that action at this time.
0 commit comments