The Swift Package Index logo.Swift Package Index

Build Information

Failed to build UniSocket, reference 0.14.0 (1785e4), with Swift 6.1 for Wasm on 27 May 2025 16:06:20 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.63.1
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/seznam/swift-unisocket.git
Reference: 0.14.0
Initialized empty Git repository in /host/spi-builder-workspace/.git/
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: 	git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: 	git branch -m <name>
From https://github.com/seznam/swift-unisocket
 * tag               0.14.0     -> FETCH_HEAD
HEAD is now at 1785e43 Update README.md.
Cloned https://github.com/seznam/swift-unisocket.git
Revision (git rev-parse @):
1785e432fb8497265a38712cdb9584c429ca3f96
SUCCESS checkout https://github.com/seznam/swift-unisocket.git at 0.14.0
========================================
Build
========================================
Selected platform:         wasm
Swift version:             6.1
Building package at path:  $PWD
https://github.com/seznam/swift-unisocket.git
https://github.com/seznam/swift-unisocket.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
{
  "dependencies" : [
    {
      "identity" : "dns",
      "requirement" : {
        "range" : [
          {
            "lower_bound" : "1.2.0",
            "upper_bound" : "2.0.0"
          }
        ]
      },
      "type" : "sourceControl",
      "url" : "https://github.com/Bouke/DNS.git"
    }
  ],
  "manifest_display_name" : "UniSocket",
  "name" : "UniSocket",
  "path" : "/host/spi-builder-workspace",
  "platforms" : [
  ],
  "products" : [
    {
      "name" : "UniSocket",
      "targets" : [
        "UniSocket"
      ],
      "type" : {
        "library" : [
          "automatic"
        ]
      }
    }
  ],
  "swift_languages_versions" : [
    "5"
  ],
  "targets" : [
    {
      "c99name" : "UniSocketTests",
      "module_type" : "SwiftTarget",
      "name" : "UniSocketTests",
      "path" : "Tests/UniSocketTests",
      "product_dependencies" : [
        "DNS"
      ],
      "sources" : [
        "UniSocketTests.swift"
      ],
      "target_dependencies" : [
        "UniSocket"
      ],
      "type" : "test"
    },
    {
      "c99name" : "UniSocket",
      "module_type" : "SwiftTarget",
      "name" : "UniSocket",
      "path" : "Sources/UniSocket",
      "product_memberships" : [
        "UniSocket"
      ],
      "sources" : [
        "UniSocket.swift"
      ],
      "type" : "library"
    }
  ],
  "tools_version" : "5.2"
}
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
Fetching https://github.com/Bouke/DNS.git
[1/908] Fetching dns
Fetched https://github.com/Bouke/DNS.git from cache (0.74s)
Computing version for https://github.com/Bouke/DNS.git
Computed https://github.com/Bouke/DNS.git at 1.2.0 (2.79s)
Creating working copy for https://github.com/Bouke/DNS.git
Working copy of https://github.com/Bouke/DNS.git resolved at 1.2.0
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/4] Emitting module UniSocket
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:73:50: error: cannot find type 'addrinfo' in scope
 71 | 	private let fdmask_bits: Int
 72 | 	private let peer: String
 73 | 	private var peer_addrinfo: UnsafeMutablePointer<addrinfo>
    |                                                  `- error: cannot find type 'addrinfo' in scope
 74 | 	private var peer_local = sockaddr_un()
 75 | 	private var buffer: UnsafeMutablePointer<UInt8>
[4/4] Compiling UniSocket UniSocket.swift
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:73:50: error: cannot find type 'addrinfo' in scope
 71 | 	private let fdmask_bits: Int
 72 | 	private let peer: String
 73 | 	private var peer_addrinfo: UnsafeMutablePointer<addrinfo>
    |                                                  `- error: cannot find type 'addrinfo' in scope
 74 | 	private var peer_local = sockaddr_un()
 75 | 	private var buffer: UnsafeMutablePointer<UInt8>
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:85:30: error: cannot find type 'fdmask' in scope
 83 | 		self.timeout = timeout
 84 | 		self.peer = peer
 85 | 		fdmask_size = MemoryLayout<fdmask>.size
    |                              `- error: cannot find type 'fdmask' in scope
 86 | 		fdmask_bits = fdmask_size * 8
 87 | 		buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: bufferSize)
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:88:40: error: cannot find type 'addrinfo' in scope
 86 | 		fdmask_bits = fdmask_size * 8
 87 | 		buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: bufferSize)
 88 | 		peer_addrinfo = UnsafeMutablePointer<addrinfo>.allocate(capacity: 1)
    |                                        `- error: cannot find type 'addrinfo' in scope
 89 | 		memset(peer_addrinfo, 0, MemoryLayout<addrinfo>.size)
 90 | 		if type == .local {
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:89:41: error: cannot find type 'addrinfo' in scope
 87 | 		buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: bufferSize)
 88 | 		peer_addrinfo = UnsafeMutablePointer<addrinfo>.allocate(capacity: 1)
 89 | 		memset(peer_addrinfo, 0, MemoryLayout<addrinfo>.size)
    |                                         `- error: cannot find type 'addrinfo' in scope
 90 | 		if type == .local {
 91 | 			peer_local.sun_family = sa_family_t(AF_UNIX)
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:92:49: error: value of type 'sockaddr_un' has no member 'sun_path'
 90 | 		if type == .local {
 91 | 			peer_local.sun_family = sa_family_t(AF_UNIX)
 92 | 			_ = withUnsafeMutablePointer(to: &peer_local.sun_path.0) { ptr in
    |                                                 `- error: value of type 'sockaddr_un' has no member 'sun_path'
 93 | 				_ = peer.withCString {
 94 | 					strcpy(ptr, $0)
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:97:38: error: cannot find 'PF_LOCAL' in scope
 95 | 				}
 96 | 			}
 97 | 			peer_addrinfo.pointee.ai_family = PF_LOCAL
    |                                      `- error: cannot find 'PF_LOCAL' in scope
 98 | #if os(macOS) || os(iOS) || os(tvOS)
 99 | 			peer_addrinfo.pointee.ai_socktype = SOCK_STREAM
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:134:34: error: cannot find type 'addrinfo' in scope
132 | 				throw UniSocketError.error(detail: "unsupported socket type \(type)")
133 | 			}
134 | 			var ptr: UnsafeMutablePointer<addrinfo>? = peer_addrinfo
    |                                  `- error: cannot find type 'addrinfo' in scope
135 | 			peer_addrinfo.deallocate()
136 | 			rc = getaddrinfo(peer, String(p), &hints, &ptr)
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:136:9: error: cannot find 'getaddrinfo' in scope
134 | 			var ptr: UnsafeMutablePointer<addrinfo>? = peer_addrinfo
135 | 			peer_addrinfo.deallocate()
136 | 			rc = getaddrinfo(peer, String(p), &hints, &ptr)
    |         `- error: cannot find 'getaddrinfo' in scope
137 | 			if rc != 0 {
138 | 				if rc == EAI_SYSTEM {
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:136:39: error: cannot find 'hints' in scope
134 | 			var ptr: UnsafeMutablePointer<addrinfo>? = peer_addrinfo
135 | 			peer_addrinfo.deallocate()
136 | 			rc = getaddrinfo(peer, String(p), &hints, &ptr)
    |                                       `- error: cannot find 'hints' in scope
137 | 			if rc != 0 {
138 | 				if rc == EAI_SYSTEM {
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:138:14: error: cannot find 'EAI_SYSTEM' in scope
136 | 			rc = getaddrinfo(peer, String(p), &hints, &ptr)
137 | 			if rc != 0 {
138 | 				if rc == EAI_SYSTEM {
    |              `- error: cannot find 'EAI_SYSTEM' in scope
139 | 					errstr = String(validatingUTF8: strerror(errno)) ?? "unknown error code"
140 | 				} else {
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:141:38: error: cannot find 'gai_strerror' in scope
139 | 					errstr = String(validatingUTF8: strerror(errno)) ?? "unknown error code"
140 | 				} else {
141 | 					errstr = String(validatingUTF8: gai_strerror(rc)) ?? "unknown error code"
    |                                      `- error: cannot find 'gai_strerror' in scope
142 | 				}
143 | 				throw UniSocketError.error(detail: "failed to resolve '\(peer)', \(errstr)")
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:155:4: error: cannot find 'freeaddrinfo' in scope
153 | 			peer_addrinfo.deallocate()
154 | 		} else {
155 | 			freeaddrinfo(peer_addrinfo)
    |    `- error: cannot find 'freeaddrinfo' in scope
156 | 		}
157 | 	}
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:162:13: error: cannot find type 'fdmask' in scope
160 | 		let index = Int(fd) / fdmask_bits
161 | 		let bit = Int(fd) % fdmask_bits
162 | 		var mask: fdmask = 1 << bit
    |             `- error: cannot find type 'fdmask' in scope
163 | 		_ = withUnsafePointer(to: &mask) { src in
164 | 			_ = withUnsafeMutablePointer(to: &fdset) { dst in
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:177:32: error: cannot find type 'addrinfo' in scope
175 | 		var rc: Int32
176 | 		var errstr: String? = ""
177 | 		var ai: UnsafeMutablePointer<addrinfo>? = peer_addrinfo
    |                                `- error: cannot find type 'addrinfo' in scope
178 | 		while ai != nil {
179 | 			fd = system_socket(ai!.pointee.ai_family, ai!.pointee.ai_socktype, ai!.pointee.ai_protocol)
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:179:9: error: cannot find 'system_socket' in scope
177 | 		var ai: UnsafeMutablePointer<addrinfo>? = peer_addrinfo
178 | 		while ai != nil {
179 | 			fd = system_socket(ai!.pointee.ai_family, ai!.pointee.ai_socktype, ai!.pointee.ai_protocol)
    |         `- error: cannot find 'system_socket' in scope
180 | 			if fd == -1 {
181 | 				ai = ai?.pointee.ai_next
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:186:47: error: cannot find 'O_NONBLOCK' in scope
184 | 			FD_SET()
185 | 			let flags = fcntl(fd, F_GETFL)
186 | 			if flags != -1, fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0 {
    |                                               `- error: cannot find 'O_NONBLOCK' in scope
187 | 				if type == .udp {
188 | 					status = .stateless
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:191:10: error: cannot find 'system_connect' in scope
189 | 					return
190 | 				}
191 | 				rc = system_connect(fd, ai!.pointee.ai_addr, ai!.pointee.ai_addrlen)
    |          `- error: cannot find 'system_connect' in scope
192 | 				if rc == 0 {
193 | 					break
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:205:8: error: cannot find 'system_close' in scope
203 | 				errstr = String(validatingUTF8: strerror(errno)) ?? "unknown error code"
204 | 			}
205 | 			_ = system_close(fd)
    |        `- error: cannot find 'system_close' in scope
206 | 			fd = -1
207 | 			ai = ai?.pointee.ai_next
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:217:23: error: cannot find 'SHUT_RDWR' in scope
215 | 	public func close() throws -> Void {
216 | 		if status == .connected {
217 | 			shutdown(fd, Int32(SHUT_RDWR))
    |                       `- error: cannot find 'SHUT_RDWR' in scope
218 | 			usleep(10000)
219 | 		}
/root/.swiftpm/swift-sdks/swift-wasm-6.1-RELEASE-wasm32-unknown-wasi.artifactbundle/6.1-RELEASE-wasm32-unknown-wasi/wasm32-unknown-wasi/WASI.sdk/include/wasm32-wasi/__header_sys_socket.h:13:9: note: macro 'SHUT_RDWR' unavailable: structure not supported
11 | #define SHUT_RD __WASI_SDFLAGS_RD
12 | #define SHUT_WR __WASI_SDFLAGS_WR
13 | #define SHUT_RDWR (SHUT_RD | SHUT_WR)
   |         `- note: macro 'SHUT_RDWR' unavailable: structure not supported
14 |
15 | #ifdef __wasilibc_use_wasip2
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:221:8: error: cannot find 'system_close' in scope
219 | 		}
220 | 		if fd != -1 {
221 | 			_ = system_close(fd)
    |        `- error: cannot find 'system_close' in scope
222 | 			fd = -1
223 | 		}
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:257:31: error: cannot find 'SO_ERROR' in scope
255 | 		} else if rc == 0 {
256 | 			var len = socklen_t(MemoryLayout<Int32>.size)
257 | 			getsockopt(fd, SOL_SOCKET, SO_ERROR, &rc, &len)
    |                               `- error: cannot find 'SO_ERROR' in scope
258 | 			if rc == 0 {
259 | 				rc = ETIMEDOUT
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:281:9: error: cannot find 'system_recv' in scope
279 | 				limit = m - data.count
280 | 			}
281 | 			rc = system_recv(fd, buffer, limit, 0)
    |         `- error: cannot find 'system_recv' in scope
282 | 			if rc == 0 {
283 | 				try? close()
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:314:86: error: cannot find 'system_sendto' in scope
312 | 			}
313 | 			if status == .stateless {
314 | 				rc = bufferLeft.withUnsafeBytes { (ptr: UnsafeRawBufferPointer) -> Int in return system_sendto(fd, ptr.baseAddress, bytesLeft, 0, peer_addrinfo.pointee.ai_addr, peer_addrinfo.pointee.ai_addrlen) }
    |                                                                                      `- error: cannot find 'system_sendto' in scope
315 | 			} else {
316 | 				rc = bufferLeft.withUnsafeBytes { (ptr: UnsafeRawBufferPointer) -> Int in return system_send(fd, ptr.baseAddress, bytesLeft, 0) }
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:316:86: error: cannot find 'system_send' in scope
314 | 				rc = bufferLeft.withUnsafeBytes { (ptr: UnsafeRawBufferPointer) -> Int in return system_sendto(fd, ptr.baseAddress, bytesLeft, 0, peer_addrinfo.pointee.ai_addr, peer_addrinfo.pointee.ai_addrlen) }
315 | 			} else {
316 | 				rc = bufferLeft.withUnsafeBytes { (ptr: UnsafeRawBufferPointer) -> Int in return system_send(fd, ptr.baseAddress, bytesLeft, 0) }
    |                                                                                      `- error: cannot find 'system_send' in scope
317 | 			}
318 | 			if rc == -1 {
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest swift build --swift-sdk wasm32-unknown-wasi 2>&1
wasm-6.1-latest: Pulling from finestructure/spi-images
Digest: sha256:7e37457820e5f17452a98118754f345f2619722c485f2db0d8b666940a83afd2
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:wasm-6.1-latest
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-24593BA9C3E375BF.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[2/3] Emitting module UniSocket
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:73:50: error: cannot find type 'addrinfo' in scope
 71 | 	private let fdmask_bits: Int
 72 | 	private let peer: String
 73 | 	private var peer_addrinfo: UnsafeMutablePointer<addrinfo>
    |                                                  `- error: cannot find type 'addrinfo' in scope
 74 | 	private var peer_local = sockaddr_un()
 75 | 	private var buffer: UnsafeMutablePointer<UInt8>
[3/3] Compiling UniSocket UniSocket.swift
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:73:50: error: cannot find type 'addrinfo' in scope
 71 | 	private let fdmask_bits: Int
 72 | 	private let peer: String
 73 | 	private var peer_addrinfo: UnsafeMutablePointer<addrinfo>
    |                                                  `- error: cannot find type 'addrinfo' in scope
 74 | 	private var peer_local = sockaddr_un()
 75 | 	private var buffer: UnsafeMutablePointer<UInt8>
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:85:30: error: cannot find type 'fdmask' in scope
 83 | 		self.timeout = timeout
 84 | 		self.peer = peer
 85 | 		fdmask_size = MemoryLayout<fdmask>.size
    |                              `- error: cannot find type 'fdmask' in scope
 86 | 		fdmask_bits = fdmask_size * 8
 87 | 		buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: bufferSize)
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:88:40: error: cannot find type 'addrinfo' in scope
 86 | 		fdmask_bits = fdmask_size * 8
 87 | 		buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: bufferSize)
 88 | 		peer_addrinfo = UnsafeMutablePointer<addrinfo>.allocate(capacity: 1)
    |                                        `- error: cannot find type 'addrinfo' in scope
 89 | 		memset(peer_addrinfo, 0, MemoryLayout<addrinfo>.size)
 90 | 		if type == .local {
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:89:41: error: cannot find type 'addrinfo' in scope
 87 | 		buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: bufferSize)
 88 | 		peer_addrinfo = UnsafeMutablePointer<addrinfo>.allocate(capacity: 1)
 89 | 		memset(peer_addrinfo, 0, MemoryLayout<addrinfo>.size)
    |                                         `- error: cannot find type 'addrinfo' in scope
 90 | 		if type == .local {
 91 | 			peer_local.sun_family = sa_family_t(AF_UNIX)
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:92:49: error: value of type 'sockaddr_un' has no member 'sun_path'
 90 | 		if type == .local {
 91 | 			peer_local.sun_family = sa_family_t(AF_UNIX)
 92 | 			_ = withUnsafeMutablePointer(to: &peer_local.sun_path.0) { ptr in
    |                                                 `- error: value of type 'sockaddr_un' has no member 'sun_path'
 93 | 				_ = peer.withCString {
 94 | 					strcpy(ptr, $0)
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:97:38: error: cannot find 'PF_LOCAL' in scope
 95 | 				}
 96 | 			}
 97 | 			peer_addrinfo.pointee.ai_family = PF_LOCAL
    |                                      `- error: cannot find 'PF_LOCAL' in scope
 98 | #if os(macOS) || os(iOS) || os(tvOS)
 99 | 			peer_addrinfo.pointee.ai_socktype = SOCK_STREAM
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:134:34: error: cannot find type 'addrinfo' in scope
132 | 				throw UniSocketError.error(detail: "unsupported socket type \(type)")
133 | 			}
134 | 			var ptr: UnsafeMutablePointer<addrinfo>? = peer_addrinfo
    |                                  `- error: cannot find type 'addrinfo' in scope
135 | 			peer_addrinfo.deallocate()
136 | 			rc = getaddrinfo(peer, String(p), &hints, &ptr)
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:136:9: error: cannot find 'getaddrinfo' in scope
134 | 			var ptr: UnsafeMutablePointer<addrinfo>? = peer_addrinfo
135 | 			peer_addrinfo.deallocate()
136 | 			rc = getaddrinfo(peer, String(p), &hints, &ptr)
    |         `- error: cannot find 'getaddrinfo' in scope
137 | 			if rc != 0 {
138 | 				if rc == EAI_SYSTEM {
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:136:39: error: cannot find 'hints' in scope
134 | 			var ptr: UnsafeMutablePointer<addrinfo>? = peer_addrinfo
135 | 			peer_addrinfo.deallocate()
136 | 			rc = getaddrinfo(peer, String(p), &hints, &ptr)
    |                                       `- error: cannot find 'hints' in scope
137 | 			if rc != 0 {
138 | 				if rc == EAI_SYSTEM {
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:138:14: error: cannot find 'EAI_SYSTEM' in scope
136 | 			rc = getaddrinfo(peer, String(p), &hints, &ptr)
137 | 			if rc != 0 {
138 | 				if rc == EAI_SYSTEM {
    |              `- error: cannot find 'EAI_SYSTEM' in scope
139 | 					errstr = String(validatingUTF8: strerror(errno)) ?? "unknown error code"
140 | 				} else {
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:141:38: error: cannot find 'gai_strerror' in scope
139 | 					errstr = String(validatingUTF8: strerror(errno)) ?? "unknown error code"
140 | 				} else {
141 | 					errstr = String(validatingUTF8: gai_strerror(rc)) ?? "unknown error code"
    |                                      `- error: cannot find 'gai_strerror' in scope
142 | 				}
143 | 				throw UniSocketError.error(detail: "failed to resolve '\(peer)', \(errstr)")
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:155:4: error: cannot find 'freeaddrinfo' in scope
153 | 			peer_addrinfo.deallocate()
154 | 		} else {
155 | 			freeaddrinfo(peer_addrinfo)
    |    `- error: cannot find 'freeaddrinfo' in scope
156 | 		}
157 | 	}
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:162:13: error: cannot find type 'fdmask' in scope
160 | 		let index = Int(fd) / fdmask_bits
161 | 		let bit = Int(fd) % fdmask_bits
162 | 		var mask: fdmask = 1 << bit
    |             `- error: cannot find type 'fdmask' in scope
163 | 		_ = withUnsafePointer(to: &mask) { src in
164 | 			_ = withUnsafeMutablePointer(to: &fdset) { dst in
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:177:32: error: cannot find type 'addrinfo' in scope
175 | 		var rc: Int32
176 | 		var errstr: String? = ""
177 | 		var ai: UnsafeMutablePointer<addrinfo>? = peer_addrinfo
    |                                `- error: cannot find type 'addrinfo' in scope
178 | 		while ai != nil {
179 | 			fd = system_socket(ai!.pointee.ai_family, ai!.pointee.ai_socktype, ai!.pointee.ai_protocol)
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:179:9: error: cannot find 'system_socket' in scope
177 | 		var ai: UnsafeMutablePointer<addrinfo>? = peer_addrinfo
178 | 		while ai != nil {
179 | 			fd = system_socket(ai!.pointee.ai_family, ai!.pointee.ai_socktype, ai!.pointee.ai_protocol)
    |         `- error: cannot find 'system_socket' in scope
180 | 			if fd == -1 {
181 | 				ai = ai?.pointee.ai_next
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:186:47: error: cannot find 'O_NONBLOCK' in scope
184 | 			FD_SET()
185 | 			let flags = fcntl(fd, F_GETFL)
186 | 			if flags != -1, fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0 {
    |                                               `- error: cannot find 'O_NONBLOCK' in scope
187 | 				if type == .udp {
188 | 					status = .stateless
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:191:10: error: cannot find 'system_connect' in scope
189 | 					return
190 | 				}
191 | 				rc = system_connect(fd, ai!.pointee.ai_addr, ai!.pointee.ai_addrlen)
    |          `- error: cannot find 'system_connect' in scope
192 | 				if rc == 0 {
193 | 					break
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:205:8: error: cannot find 'system_close' in scope
203 | 				errstr = String(validatingUTF8: strerror(errno)) ?? "unknown error code"
204 | 			}
205 | 			_ = system_close(fd)
    |        `- error: cannot find 'system_close' in scope
206 | 			fd = -1
207 | 			ai = ai?.pointee.ai_next
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:217:23: error: cannot find 'SHUT_RDWR' in scope
215 | 	public func close() throws -> Void {
216 | 		if status == .connected {
217 | 			shutdown(fd, Int32(SHUT_RDWR))
    |                       `- error: cannot find 'SHUT_RDWR' in scope
218 | 			usleep(10000)
219 | 		}
/root/.swiftpm/swift-sdks/swift-wasm-6.1-RELEASE-wasm32-unknown-wasi.artifactbundle/6.1-RELEASE-wasm32-unknown-wasi/wasm32-unknown-wasi/WASI.sdk/include/wasm32-wasi/__header_sys_socket.h:13:9: note: macro 'SHUT_RDWR' unavailable: structure not supported
11 | #define SHUT_RD __WASI_SDFLAGS_RD
12 | #define SHUT_WR __WASI_SDFLAGS_WR
13 | #define SHUT_RDWR (SHUT_RD | SHUT_WR)
   |         `- note: macro 'SHUT_RDWR' unavailable: structure not supported
14 |
15 | #ifdef __wasilibc_use_wasip2
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:221:8: error: cannot find 'system_close' in scope
219 | 		}
220 | 		if fd != -1 {
221 | 			_ = system_close(fd)
    |        `- error: cannot find 'system_close' in scope
222 | 			fd = -1
223 | 		}
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:257:31: error: cannot find 'SO_ERROR' in scope
255 | 		} else if rc == 0 {
256 | 			var len = socklen_t(MemoryLayout<Int32>.size)
257 | 			getsockopt(fd, SOL_SOCKET, SO_ERROR, &rc, &len)
    |                               `- error: cannot find 'SO_ERROR' in scope
258 | 			if rc == 0 {
259 | 				rc = ETIMEDOUT
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:281:9: error: cannot find 'system_recv' in scope
279 | 				limit = m - data.count
280 | 			}
281 | 			rc = system_recv(fd, buffer, limit, 0)
    |         `- error: cannot find 'system_recv' in scope
282 | 			if rc == 0 {
283 | 				try? close()
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:314:86: error: cannot find 'system_sendto' in scope
312 | 			}
313 | 			if status == .stateless {
314 | 				rc = bufferLeft.withUnsafeBytes { (ptr: UnsafeRawBufferPointer) -> Int in return system_sendto(fd, ptr.baseAddress, bytesLeft, 0, peer_addrinfo.pointee.ai_addr, peer_addrinfo.pointee.ai_addrlen) }
    |                                                                                      `- error: cannot find 'system_sendto' in scope
315 | 			} else {
316 | 				rc = bufferLeft.withUnsafeBytes { (ptr: UnsafeRawBufferPointer) -> Int in return system_send(fd, ptr.baseAddress, bytesLeft, 0) }
/host/spi-builder-workspace/Sources/UniSocket/UniSocket.swift:316:86: error: cannot find 'system_send' in scope
314 | 				rc = bufferLeft.withUnsafeBytes { (ptr: UnsafeRawBufferPointer) -> Int in return system_sendto(fd, ptr.baseAddress, bytesLeft, 0, peer_addrinfo.pointee.ai_addr, peer_addrinfo.pointee.ai_addrlen) }
315 | 			} else {
316 | 				rc = bufferLeft.withUnsafeBytes { (ptr: UnsafeRawBufferPointer) -> Int in return system_send(fd, ptr.baseAddress, bytesLeft, 0) }
    |                                                                                      `- error: cannot find 'system_send' in scope
317 | 			}
318 | 			if rc == -1 {
BUILD FAILURE 6.1 wasm