Build Information
Failed to build AMSMB2, reference 4.0.2 (0e8a77
), with Swift 6.2 (beta) for Android on 23 Jun 2025 06:35:02 UTC.
Build Command
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.2-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1
Build Log
========================================
RunAll
========================================
Builder version: 4.64.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/amosavian/AMSMB2.git
Reference: 4.0.2
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/amosavian/AMSMB2
* tag 4.0.2 -> FETCH_HEAD
HEAD is now at 0e8a776 chore: Minor refactors
Submodule path 'Dependencies/libsmb2': checked out '2f3ea145cdb5b01e30a817bd5fe843ac6281403e'
Submodule 'Dependencies/libsmb2' (https://github.com/sahlberg/libsmb2) registered for path 'Dependencies/libsmb2'
Cloning into '/host/spi-builder-workspace/Dependencies/libsmb2'...
Cloned https://github.com/amosavian/AMSMB2.git
Revision (git rev-parse @):
0e8a77612c6dc8048c4093ed7a00089bb1238102
SUCCESS checkout https://github.com/amosavian/AMSMB2.git at 4.0.2
========================================
Build
========================================
Selected platform: android
Swift version: 6.2
Building package at path: $PWD
https://github.com/amosavian/AMSMB2.git
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4609320-3":/host -w "$PWD" registry.gitlab.com/finestructure/spi-images:android-6.2-latest swift build --swift-sdk aarch64-unknown-linux-android28 2>&1
android-6.2-latest: Pulling from finestructure/spi-images
Digest: sha256:b7c4a6b4153ff40ef9277e2157e708f835b8eb011095d53bd8db4594eb2b7798
Status: Image is up to date for registry.gitlab.com/finestructure/spi-images:android-6.2-latest
Fetching https://github.com/apple/swift-atomics.git
[1/1797] Fetching swift-atomics
Fetched https://github.com/apple/swift-atomics.git from cache (0.55s)
Computing version for https://github.com/apple/swift-atomics.git
Computed https://github.com/apple/swift-atomics.git at 1.3.0 (1.74s)
Creating working copy for https://github.com/apple/swift-atomics.git
Working copy of https://github.com/apple/swift-atomics.git resolved at 1.3.0
Building for debugging...
[0/60] Compiling aes_apple.c
[1/60] Compiling usha.c
[2/60] Compiling aes128ccm.c
[3/60] Compiling aes.c
[4/60] Write swift-version-8C5A4AE7A8CE2BA.txt
[5/60] Compiling timestamps.c
[6/60] Compiling unicode.c
[7/60] Compiling sync.c
[8/60] Compiling smb2-signing.c
[9/60] Compiling spnego-wrapper.c
[10/60] Compiling smb3-seal.c
[11/60] Compiling smb2-share-enum.c
[12/60] Compiling smb2-data-reparse-point.c
[13/60] Compiling smb2-data-security-descriptor.c
[14/60] Compiling smb2-data-file-info.c
[14/60] Compiling smb2-data-filesystem-info.c
[16/60] Compiling smb2-cmd-set-info.c
[17/60] Compiling smb2-cmd-session-setup.c
[18/60] Compiling socket.c
[19/60] Compiling smb2-cmd-write.c
[20/60] Compiling smb2-cmd-query-directory.c
[21/60] Compiling smb2-cmd-tree-disconnect.c
[22/60] Compiling smb2-cmd-tree-connect.c
[22/60] Compiling smb2-cmd-read.c
[24/60] Compiling smb2-cmd-query-info.c
[25/60] Compiling smb2-cmd-notify-change.c
[26/60] Compiling smb2-cmd-oplock-break.c
[27/60] Compiling smb2-cmd-lock.c
[28/60] Compiling smb2-cmd-logoff.c
[29/60] Compiling smb2-cmd-error.c
[30/60] Compiling smb2-cmd-flush.c
[31/60] Compiling smb2-cmd-ioctl.c
[32/60] Compiling smb2-cmd-close.c
[32/60] Compiling smb2-cmd-negotiate.c
[34/60] Compiling smb2-cmd-echo.c
[35/60] Compiling sha1.c
[36/60] Compiling sha224-256.c
[37/60] Compiling smb2-cmd-create.c
[38/60] Compiling sha384-512.c
[39/60] Compiling krb5-wrapper.c
[40/60] Compiling md5.c
[41/60] Compiling md4c.c
[42/60] Compiling hmac-md5.c
[43/60] Compiling pdu.c
[44/60] Compiling hmac.c
[45/60] Compiling init.c
[46/60] Compiling compat.c
[47/60] Compiling errors.c
[48/60] Compiling asn1-ber.c
[48/60] Write sources
[50/60] Compiling ntlmssp.c
[51/60] Compiling dcerpc-srvsvc.c
[52/60] Compiling aes_reference.c
[53/60] Compiling libsmb2.c
[54/60] Compiling dcerpc.c
[55/60] Compiling dcerpc-lsa.c
[56/60] Compiling alloc.c
error: emit-module command failed with exit code 1 (use -v to see invocation)
[58/71] Emitting module AMSMB2
/host/spi-builder-workspace/AMSMB2/Context.swift:624:25: error: cannot find type 'POSIXErrorCode' in scope
622 | }
623 |
624 | var posixErrorCode: POSIXErrorCode {
| `- error: cannot find type 'POSIXErrorCode' in scope
625 | .init(nterror_to_errno(rawValue))
626 | }
/host/spi-builder-workspace/AMSMB2/Extensions.swift:72:11: error: cannot find type 'POSIXErrorCode' in scope
70 | }
71 |
72 | extension POSIXErrorCode {
| `- error: cannot find type 'POSIXErrorCode' in scope
73 | init(_ code: Int32) {
74 | self = POSIXErrorCode(rawValue: code) ?? .ECANCELED
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:17:24: error: cannot find 'O_NOFOLLOW' in scope
15 |
16 | #if os(Linux) || os(Android) || os(OpenBSD)
17 | let O_SYMLINK: Int32 = O_NOFOLLOW
| `- error: cannot find 'O_NOFOLLOW' in scope
18 | #endif
19 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:390:53: error: cannot find 'LOCK_SH' in scope
388 | var rawValue: Int32
389 |
390 | static let shared = LockOperation(rawValue: LOCK_SH)
| `- error: cannot find 'LOCK_SH' in scope
391 | static let exclusive = LockOperation(rawValue: LOCK_EX)
392 | static let unlock = LockOperation(rawValue: LOCK_UN)
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:391:56: error: cannot find 'LOCK_EX' in scope
389 |
390 | static let shared = LockOperation(rawValue: LOCK_SH)
391 | static let exclusive = LockOperation(rawValue: LOCK_EX)
| `- error: cannot find 'LOCK_EX' in scope
392 | static let unlock = LockOperation(rawValue: LOCK_UN)
393 | static let nonBlocking = LockOperation(rawValue: LOCK_NB)
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:392:53: error: cannot find 'LOCK_UN' in scope
390 | static let shared = LockOperation(rawValue: LOCK_SH)
391 | static let exclusive = LockOperation(rawValue: LOCK_EX)
392 | static let unlock = LockOperation(rawValue: LOCK_UN)
| `- error: cannot find 'LOCK_UN' in scope
393 | static let nonBlocking = LockOperation(rawValue: LOCK_NB)
394 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:393:58: error: cannot find 'LOCK_NB' in scope
391 | static let exclusive = LockOperation(rawValue: LOCK_EX)
392 | static let unlock = LockOperation(rawValue: LOCK_UN)
393 | static let nonBlocking = LockOperation(rawValue: LOCK_NB)
| `- error: cannot find 'LOCK_NB' in scope
394 |
395 | var smb2Flag: UInt32 {
/host/spi-builder-workspace/AMSMB2/Stream.swift:105:61: warning: conformance of 'AsyncInputStream<Seq>' to protocol 'Sendable' is already unavailable
103 | }
104 |
105 | public class AsyncInputStream<Seq>: InputStream, @unchecked Sendable where Seq: AsyncSequence, Seq.Element: DataProtocol {
| | `- warning: conformance of 'AsyncInputStream<Seq>' to protocol 'Sendable' is already unavailable
| `- note: 'AsyncInputStream<Seq>' inherits conformance to protocol 'Sendable' from superclass here
106 | private var stream: Seq
107 | private var iterator: Seq.AsyncIterator
[59/72] Compiling AMSMB2 Parsers.swift
[60/72] Compiling AMSMB2 ObjCCompat.swift
[61/72] Compiling AMSMB2 FileHandle.swift
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:17:24: error: cannot find 'O_NOFOLLOW' in scope
15 |
16 | #if os(Linux) || os(Android) || os(OpenBSD)
17 | let O_SYMLINK: Int32 = O_NOFOLLOW
| `- error: cannot find 'O_NOFOLLOW' in scope
18 | #endif
19 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:390:53: error: cannot find 'LOCK_SH' in scope
388 | var rawValue: Int32
389 |
390 | static let shared = LockOperation(rawValue: LOCK_SH)
| `- error: cannot find 'LOCK_SH' in scope
391 | static let exclusive = LockOperation(rawValue: LOCK_EX)
392 | static let unlock = LockOperation(rawValue: LOCK_UN)
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:391:56: error: cannot find 'LOCK_EX' in scope
389 |
390 | static let shared = LockOperation(rawValue: LOCK_SH)
391 | static let exclusive = LockOperation(rawValue: LOCK_EX)
| `- error: cannot find 'LOCK_EX' in scope
392 | static let unlock = LockOperation(rawValue: LOCK_UN)
393 | static let nonBlocking = LockOperation(rawValue: LOCK_NB)
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:392:53: error: cannot find 'LOCK_UN' in scope
390 | static let shared = LockOperation(rawValue: LOCK_SH)
391 | static let exclusive = LockOperation(rawValue: LOCK_EX)
392 | static let unlock = LockOperation(rawValue: LOCK_UN)
| `- error: cannot find 'LOCK_UN' in scope
393 | static let nonBlocking = LockOperation(rawValue: LOCK_NB)
394 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:393:58: error: cannot find 'LOCK_NB' in scope
391 | static let exclusive = LockOperation(rawValue: LOCK_EX)
392 | static let unlock = LockOperation(rawValue: LOCK_UN)
393 | static let nonBlocking = LockOperation(rawValue: LOCK_NB)
| `- error: cannot find 'LOCK_NB' in scope
394 |
395 | var smb2Flag: UInt32 {
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:25:36: error: cannot find 'O_RDONLY' in scope
23 |
24 | convenience init(forReadingAtPath path: String, on client: SMB2Client) throws {
25 | try self.init(path, flags: O_RDONLY, on: client)
| `- error: cannot find 'O_RDONLY' in scope
26 | }
27 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:29:36: error: cannot find 'O_WRONLY' in scope
27 |
28 | convenience init(forWritingAtPath path: String, on client: SMB2Client) throws {
29 | try self.init(path, flags: O_WRONLY, on: client)
| `- error: cannot find 'O_WRONLY' in scope
30 | }
31 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:33:36: error: cannot find 'O_RDWR' in scope
31 |
32 | convenience init(forUpdatingAtPath path: String, on client: SMB2Client) throws {
33 | try self.init(path, flags: O_RDWR | O_APPEND, on: client)
| `- error: cannot find 'O_RDWR' in scope
34 | }
35 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:33:45: error: cannot find 'O_APPEND' in scope
31 |
32 | convenience init(forUpdatingAtPath path: String, on client: SMB2Client) throws {
33 | try self.init(path, flags: O_RDWR | O_APPEND, on: client)
| `- error: cannot find 'O_APPEND' in scope
34 | }
35 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:33:43: error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
31 |
32 | convenience init(forUpdatingAtPath path: String, on client: SMB2Client) throws {
33 | try self.init(path, flags: O_RDWR | O_APPEND, on: client)
| `- error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
34 | }
35 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:37:36: error: cannot find 'O_WRONLY' in scope
35 |
36 | convenience init(forOverwritingAtPath path: String, on client: SMB2Client) throws {
37 | try self.init(path, flags: O_WRONLY | O_CREAT | O_TRUNC, on: client)
| `- error: cannot find 'O_WRONLY' in scope
38 | }
39 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:37:47: error: cannot find 'O_CREAT' in scope
35 |
36 | convenience init(forOverwritingAtPath path: String, on client: SMB2Client) throws {
37 | try self.init(path, flags: O_WRONLY | O_CREAT | O_TRUNC, on: client)
| `- error: cannot find 'O_CREAT' in scope
38 | }
39 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:37:57: error: cannot find 'O_TRUNC' in scope
35 |
36 | convenience init(forOverwritingAtPath path: String, on client: SMB2Client) throws {
37 | try self.init(path, flags: O_WRONLY | O_CREAT | O_TRUNC, on: client)
| `- error: cannot find 'O_TRUNC' in scope
38 | }
39 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:37:45: error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
35 |
36 | convenience init(forOverwritingAtPath path: String, on client: SMB2Client) throws {
37 | try self.init(path, flags: O_WRONLY | O_CREAT | O_TRUNC, on: client)
| `- error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
38 | }
39 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:41:36: error: cannot find 'O_WRONLY' in scope
39 |
40 | convenience init(forOutputAtPath path: String, on client: SMB2Client) throws {
41 | try self.init(path, flags: O_WRONLY | O_CREAT, on: client)
| `- error: cannot find 'O_WRONLY' in scope
42 | }
43 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:41:47: error: cannot find 'O_CREAT' in scope
39 |
40 | convenience init(forOutputAtPath path: String, on client: SMB2Client) throws {
41 | try self.init(path, flags: O_WRONLY | O_CREAT, on: client)
| `- error: cannot find 'O_CREAT' in scope
42 | }
43 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:41:45: error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
39 |
40 | convenience init(forOutputAtPath path: String, on client: SMB2Client) throws {
41 | try self.init(path, flags: O_WRONLY | O_CREAT, on: client)
| `- error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
42 | }
43 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:45:36: error: cannot find 'O_RDWR' in scope
43 |
44 | convenience init(forCreatingIfNotExistsAtPath path: String, on client: SMB2Client) throws {
45 | try self.init(path, flags: O_RDWR | O_CREAT | O_EXCL, on: client)
| `- error: cannot find 'O_RDWR' in scope
46 | }
47 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:45:45: error: cannot find 'O_CREAT' in scope
43 |
44 | convenience init(forCreatingIfNotExistsAtPath path: String, on client: SMB2Client) throws {
45 | try self.init(path, flags: O_RDWR | O_CREAT | O_EXCL, on: client)
| `- error: cannot find 'O_CREAT' in scope
46 | }
47 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:45:55: error: cannot find 'O_EXCL' in scope
43 |
44 | convenience init(forCreatingIfNotExistsAtPath path: String, on client: SMB2Client) throws {
45 | try self.init(path, flags: O_RDWR | O_CREAT | O_EXCL, on: client)
| `- error: cannot find 'O_EXCL' in scope
46 | }
47 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:45:43: error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
43 |
44 | convenience init(forCreatingIfNotExistsAtPath path: String, on client: SMB2Client) throws {
45 | try self.init(path, flags: O_RDWR | O_CREAT | O_EXCL, on: client)
| `- error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
46 | }
47 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:500:28: error: cannot find 'O_ACCMODE' in scope
498 |
499 | init(flags: Int32) {
500 | switch flags & O_ACCMODE {
| `- error: cannot find 'O_ACCMODE' in scope
501 | case O_RDWR:
502 | self = [.read, .write, .delete]
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:501:18: error: cannot find 'O_RDWR' in scope
499 | init(flags: Int32) {
500 | switch flags & O_ACCMODE {
501 | case O_RDWR:
| `- error: cannot find 'O_RDWR' in scope
502 | self = [.read, .write, .delete]
503 | case O_WRONLY:
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:503:18: error: cannot find 'O_WRONLY' in scope
501 | case O_RDWR:
502 | self = [.read, .write, .delete]
503 | case O_WRONLY:
| `- error: cannot find 'O_WRONLY' in scope
504 | self = [.write, .delete]
505 | default:
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:508:25: error: cannot find 'O_SYNC' in scope
506 | self = [.read]
507 | }
508 | if (flags & O_SYNC) != 0 {
| `- error: cannot find 'O_SYNC' in scope
509 | insert(.synchronize)
510 | }
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:558:28: error: cannot find 'O_ACCMODE' in scope
556 |
557 | init(flags: Int32) {
558 | switch flags & O_ACCMODE {
| `- error: cannot find 'O_ACCMODE' in scope
559 | case O_RDWR:
560 | self = [.read, .write]
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:559:18: error: cannot find 'O_RDWR' in scope
557 | init(flags: Int32) {
558 | switch flags & O_ACCMODE {
559 | case O_RDWR:
| `- error: cannot find 'O_RDWR' in scope
560 | self = [.read, .write]
561 | case O_WRONLY:
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:561:18: error: cannot find 'O_WRONLY' in scope
559 | case O_RDWR:
560 | self = [.read, .write]
561 | case O_WRONLY:
| `- error: cannot find 'O_WRONLY' in scope
562 | self = [.write]
563 | default:
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:581:25: error: cannot find 'O_CREAT' in scope
579 |
580 | init(flags: Int32) {
581 | if (flags & O_CREAT) != 0 {
| `- error: cannot find 'O_CREAT' in scope
582 | if (flags & O_EXCL) != 0 {
583 | self = .create
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:582:29: error: cannot find 'O_EXCL' in scope
580 | init(flags: Int32) {
581 | if (flags & O_CREAT) != 0 {
582 | if (flags & O_EXCL) != 0 {
| `- error: cannot find 'O_EXCL' in scope
583 | self = .create
584 | } else if (flags & O_TRUNC) != 0 {
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:584:36: error: cannot find 'O_TRUNC' in scope
582 | if (flags & O_EXCL) != 0 {
583 | self = .create
584 | } else if (flags & O_TRUNC) != 0 {
| `- error: cannot find 'O_TRUNC' in scope
585 | self = .overwriteIfExists
586 | } else {
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:590:29: error: cannot find 'O_TRUNC' in scope
588 | }
589 | } else {
590 | if (flags & O_TRUNC) != 0 {
| `- error: cannot find 'O_TRUNC' in scope
591 | self = .overwrite
592 | } else {
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:631:25: error: cannot find 'O_SYNC' in scope
629 | init(flags: Int32) {
630 | self = []
631 | if (flags & O_SYNC) != 0 {
| `- error: cannot find 'O_SYNC' in scope
632 | insert(.noIntermediateBuffering)
633 | }
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:634:25: error: cannot find 'O_DIRECTORY' in scope
632 | insert(.noIntermediateBuffering)
633 | }
634 | if (flags & O_DIRECTORY) != 0 {
| `- error: cannot find 'O_DIRECTORY' in scope
635 | insert(.directoryFile)
636 | }
[62/72] Compiling AMSMB2 FileMonitoring.swift
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:17:24: error: cannot find 'O_NOFOLLOW' in scope
15 |
16 | #if os(Linux) || os(Android) || os(OpenBSD)
17 | let O_SYMLINK: Int32 = O_NOFOLLOW
| `- error: cannot find 'O_NOFOLLOW' in scope
18 | #endif
19 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:390:53: error: cannot find 'LOCK_SH' in scope
388 | var rawValue: Int32
389 |
390 | static let shared = LockOperation(rawValue: LOCK_SH)
| `- error: cannot find 'LOCK_SH' in scope
391 | static let exclusive = LockOperation(rawValue: LOCK_EX)
392 | static let unlock = LockOperation(rawValue: LOCK_UN)
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:391:56: error: cannot find 'LOCK_EX' in scope
389 |
390 | static let shared = LockOperation(rawValue: LOCK_SH)
391 | static let exclusive = LockOperation(rawValue: LOCK_EX)
| `- error: cannot find 'LOCK_EX' in scope
392 | static let unlock = LockOperation(rawValue: LOCK_UN)
393 | static let nonBlocking = LockOperation(rawValue: LOCK_NB)
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:392:53: error: cannot find 'LOCK_UN' in scope
390 | static let shared = LockOperation(rawValue: LOCK_SH)
391 | static let exclusive = LockOperation(rawValue: LOCK_EX)
392 | static let unlock = LockOperation(rawValue: LOCK_UN)
| `- error: cannot find 'LOCK_UN' in scope
393 | static let nonBlocking = LockOperation(rawValue: LOCK_NB)
394 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:393:58: error: cannot find 'LOCK_NB' in scope
391 | static let exclusive = LockOperation(rawValue: LOCK_EX)
392 | static let unlock = LockOperation(rawValue: LOCK_UN)
393 | static let nonBlocking = LockOperation(rawValue: LOCK_NB)
| `- error: cannot find 'LOCK_NB' in scope
394 |
395 | var smb2Flag: UInt32 {
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:25:36: error: cannot find 'O_RDONLY' in scope
23 |
24 | convenience init(forReadingAtPath path: String, on client: SMB2Client) throws {
25 | try self.init(path, flags: O_RDONLY, on: client)
| `- error: cannot find 'O_RDONLY' in scope
26 | }
27 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:29:36: error: cannot find 'O_WRONLY' in scope
27 |
28 | convenience init(forWritingAtPath path: String, on client: SMB2Client) throws {
29 | try self.init(path, flags: O_WRONLY, on: client)
| `- error: cannot find 'O_WRONLY' in scope
30 | }
31 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:33:36: error: cannot find 'O_RDWR' in scope
31 |
32 | convenience init(forUpdatingAtPath path: String, on client: SMB2Client) throws {
33 | try self.init(path, flags: O_RDWR | O_APPEND, on: client)
| `- error: cannot find 'O_RDWR' in scope
34 | }
35 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:33:45: error: cannot find 'O_APPEND' in scope
31 |
32 | convenience init(forUpdatingAtPath path: String, on client: SMB2Client) throws {
33 | try self.init(path, flags: O_RDWR | O_APPEND, on: client)
| `- error: cannot find 'O_APPEND' in scope
34 | }
35 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:33:43: error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
31 |
32 | convenience init(forUpdatingAtPath path: String, on client: SMB2Client) throws {
33 | try self.init(path, flags: O_RDWR | O_APPEND, on: client)
| `- error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
34 | }
35 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:37:36: error: cannot find 'O_WRONLY' in scope
35 |
36 | convenience init(forOverwritingAtPath path: String, on client: SMB2Client) throws {
37 | try self.init(path, flags: O_WRONLY | O_CREAT | O_TRUNC, on: client)
| `- error: cannot find 'O_WRONLY' in scope
38 | }
39 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:37:47: error: cannot find 'O_CREAT' in scope
35 |
36 | convenience init(forOverwritingAtPath path: String, on client: SMB2Client) throws {
37 | try self.init(path, flags: O_WRONLY | O_CREAT | O_TRUNC, on: client)
| `- error: cannot find 'O_CREAT' in scope
38 | }
39 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:37:57: error: cannot find 'O_TRUNC' in scope
35 |
36 | convenience init(forOverwritingAtPath path: String, on client: SMB2Client) throws {
37 | try self.init(path, flags: O_WRONLY | O_CREAT | O_TRUNC, on: client)
| `- error: cannot find 'O_TRUNC' in scope
38 | }
39 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:37:45: error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
35 |
36 | convenience init(forOverwritingAtPath path: String, on client: SMB2Client) throws {
37 | try self.init(path, flags: O_WRONLY | O_CREAT | O_TRUNC, on: client)
| `- error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
38 | }
39 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:41:36: error: cannot find 'O_WRONLY' in scope
39 |
40 | convenience init(forOutputAtPath path: String, on client: SMB2Client) throws {
41 | try self.init(path, flags: O_WRONLY | O_CREAT, on: client)
| `- error: cannot find 'O_WRONLY' in scope
42 | }
43 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:41:47: error: cannot find 'O_CREAT' in scope
39 |
40 | convenience init(forOutputAtPath path: String, on client: SMB2Client) throws {
41 | try self.init(path, flags: O_WRONLY | O_CREAT, on: client)
| `- error: cannot find 'O_CREAT' in scope
42 | }
43 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:41:45: error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
39 |
40 | convenience init(forOutputAtPath path: String, on client: SMB2Client) throws {
41 | try self.init(path, flags: O_WRONLY | O_CREAT, on: client)
| `- error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
42 | }
43 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:45:36: error: cannot find 'O_RDWR' in scope
43 |
44 | convenience init(forCreatingIfNotExistsAtPath path: String, on client: SMB2Client) throws {
45 | try self.init(path, flags: O_RDWR | O_CREAT | O_EXCL, on: client)
| `- error: cannot find 'O_RDWR' in scope
46 | }
47 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:45:45: error: cannot find 'O_CREAT' in scope
43 |
44 | convenience init(forCreatingIfNotExistsAtPath path: String, on client: SMB2Client) throws {
45 | try self.init(path, flags: O_RDWR | O_CREAT | O_EXCL, on: client)
| `- error: cannot find 'O_CREAT' in scope
46 | }
47 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:45:55: error: cannot find 'O_EXCL' in scope
43 |
44 | convenience init(forCreatingIfNotExistsAtPath path: String, on client: SMB2Client) throws {
45 | try self.init(path, flags: O_RDWR | O_CREAT | O_EXCL, on: client)
| `- error: cannot find 'O_EXCL' in scope
46 | }
47 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:45:43: error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
43 |
44 | convenience init(forCreatingIfNotExistsAtPath path: String, on client: SMB2Client) throws {
45 | try self.init(path, flags: O_RDWR | O_CREAT | O_EXCL, on: client)
| `- error: cannot convert value of type 'UInt8' to expected argument type 'Int32'
46 | }
47 |
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:500:28: error: cannot find 'O_ACCMODE' in scope
498 |
499 | init(flags: Int32) {
500 | switch flags & O_ACCMODE {
| `- error: cannot find 'O_ACCMODE' in scope
501 | case O_RDWR:
502 | self = [.read, .write, .delete]
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:501:18: error: cannot find 'O_RDWR' in scope
499 | init(flags: Int32) {
500 | switch flags & O_ACCMODE {
501 | case O_RDWR:
| `- error: cannot find 'O_RDWR' in scope
502 | self = [.read, .write, .delete]
503 | case O_WRONLY:
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:503:18: error: cannot find 'O_WRONLY' in scope
501 | case O_RDWR:
502 | self = [.read, .write, .delete]
503 | case O_WRONLY:
| `- error: cannot find 'O_WRONLY' in scope
504 | self = [.write, .delete]
505 | default:
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:508:25: error: cannot find 'O_SYNC' in scope
506 | self = [.read]
507 | }
508 | if (flags & O_SYNC) != 0 {
| `- error: cannot find 'O_SYNC' in scope
509 | insert(.synchronize)
510 | }
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:558:28: error: cannot find 'O_ACCMODE' in scope
556 |
557 | init(flags: Int32) {
558 | switch flags & O_ACCMODE {
| `- error: cannot find 'O_ACCMODE' in scope
559 | case O_RDWR:
560 | self = [.read, .write]
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:559:18: error: cannot find 'O_RDWR' in scope
557 | init(flags: Int32) {
558 | switch flags & O_ACCMODE {
559 | case O_RDWR:
| `- error: cannot find 'O_RDWR' in scope
560 | self = [.read, .write]
561 | case O_WRONLY:
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:561:18: error: cannot find 'O_WRONLY' in scope
559 | case O_RDWR:
560 | self = [.read, .write]
561 | case O_WRONLY:
| `- error: cannot find 'O_WRONLY' in scope
562 | self = [.write]
563 | default:
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:581:25: error: cannot find 'O_CREAT' in scope
579 |
580 | init(flags: Int32) {
581 | if (flags & O_CREAT) != 0 {
| `- error: cannot find 'O_CREAT' in scope
582 | if (flags & O_EXCL) != 0 {
583 | self = .create
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:582:29: error: cannot find 'O_EXCL' in scope
580 | init(flags: Int32) {
581 | if (flags & O_CREAT) != 0 {
582 | if (flags & O_EXCL) != 0 {
| `- error: cannot find 'O_EXCL' in scope
583 | self = .create
584 | } else if (flags & O_TRUNC) != 0 {
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:584:36: error: cannot find 'O_TRUNC' in scope
582 | if (flags & O_EXCL) != 0 {
583 | self = .create
584 | } else if (flags & O_TRUNC) != 0 {
| `- error: cannot find 'O_TRUNC' in scope
585 | self = .overwriteIfExists
586 | } else {
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:590:29: error: cannot find 'O_TRUNC' in scope
588 | }
589 | } else {
590 | if (flags & O_TRUNC) != 0 {
| `- error: cannot find 'O_TRUNC' in scope
591 | self = .overwrite
592 | } else {
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:631:25: error: cannot find 'O_SYNC' in scope
629 | init(flags: Int32) {
630 | self = []
631 | if (flags & O_SYNC) != 0 {
| `- error: cannot find 'O_SYNC' in scope
632 | insert(.noIntermediateBuffering)
633 | }
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:634:25: error: cannot find 'O_DIRECTORY' in scope
632 | insert(.noIntermediateBuffering)
633 | }
634 | if (flags & O_DIRECTORY) != 0 {
| `- error: cannot find 'O_DIRECTORY' in scope
635 | insert(.directoryFile)
636 | }
[63/72] Compiling AMSMB2 Directory.swift
/host/spi-builder-workspace/AMSMB2/Extensions.swift:72:11: error: cannot find type 'POSIXErrorCode' in scope
70 | }
71 |
72 | extension POSIXErrorCode {
| `- error: cannot find type 'POSIXErrorCode' in scope
73 | init(_ code: Int32) {
74 | self = POSIXErrorCode(rawValue: code) ?? .ECANCELED
/host/spi-builder-workspace/AMSMB2/Extensions.swift:53:32: error: missing argument label 'rawValue:' in call
51 | let errno = Int32(-result)
52 | let errorDesc = description.map { "Error code \(errno): \($0)" }
53 | throw POSIXError(.init(errno), description: errorDesc)
| `- error: missing argument label 'rawValue:' in call
54 | }
55 |
/host/spi-builder-workspace/AMSMB2/Context.swift:624:25: error: cannot find type 'POSIXErrorCode' in scope
622 | }
623 |
624 | var posixErrorCode: POSIXErrorCode {
| `- error: cannot find type 'POSIXErrorCode' in scope
625 | .init(nterror_to_errno(rawValue))
626 | }
/host/spi-builder-workspace/AMSMB2/Extensions.swift:228:51: warning: capture of non-sendable type 'T.Type' in an isolated closure
226 |
227 | func scanInt<T: FixedWidthInteger>(offset: Int, as _: T.Type) -> Int? {
228 | scanValue(offset: offset, as: T.self).map(Int.init)
| `- warning: capture of non-sendable type 'T.Type' in an isolated closure
229 | }
230 | }
[64/72] Compiling AMSMB2 Extensions.swift
/host/spi-builder-workspace/AMSMB2/Extensions.swift:72:11: error: cannot find type 'POSIXErrorCode' in scope
70 | }
71 |
72 | extension POSIXErrorCode {
| `- error: cannot find type 'POSIXErrorCode' in scope
73 | init(_ code: Int32) {
74 | self = POSIXErrorCode(rawValue: code) ?? .ECANCELED
/host/spi-builder-workspace/AMSMB2/Extensions.swift:53:32: error: missing argument label 'rawValue:' in call
51 | let errno = Int32(-result)
52 | let errorDesc = description.map { "Error code \(errno): \($0)" }
53 | throw POSIXError(.init(errno), description: errorDesc)
| `- error: missing argument label 'rawValue:' in call
54 | }
55 |
/host/spi-builder-workspace/AMSMB2/Context.swift:624:25: error: cannot find type 'POSIXErrorCode' in scope
622 | }
623 |
624 | var posixErrorCode: POSIXErrorCode {
| `- error: cannot find type 'POSIXErrorCode' in scope
625 | .init(nterror_to_errno(rawValue))
626 | }
/host/spi-builder-workspace/AMSMB2/Extensions.swift:228:51: warning: capture of non-sendable type 'T.Type' in an isolated closure
226 |
227 | func scanInt<T: FixedWidthInteger>(offset: Int, as _: T.Type) -> Int? {
228 | scanValue(offset: offset, as: T.self).map(Int.init)
| `- warning: capture of non-sendable type 'T.Type' in an isolated closure
229 | }
230 | }
[65/72] Compiling AMSMB2 Stream.swift
/host/spi-builder-workspace/AMSMB2/Stream.swift:105:61: warning: conformance of 'AsyncInputStream<Seq>' to protocol 'Sendable' is already unavailable
103 | }
104 |
105 | public class AsyncInputStream<Seq>: InputStream, @unchecked Sendable where Seq: AsyncSequence, Seq.Element: DataProtocol {
| | `- warning: conformance of 'AsyncInputStream<Seq>' to protocol 'Sendable' is already unavailable
| `- note: 'AsyncInputStream<Seq>' inherits conformance to protocol 'Sendable' from superclass here
106 | private var stream: Seq
107 | private var iterator: Seq.AsyncIterator
/host/spi-builder-workspace/AMSMB2/Stream.swift:176:38: warning: capture of non-sendable type 'Seq.Element.Type' in an isolated closure
174 | Task {
175 | do {
176 | while let data = try await iterator.next() {
| `- warning: capture of non-sendable type 'Seq.Element.Type' in an isolated closure
177 | bufferLock.withLock {
178 | if self.buffer == nil {
/host/spi-builder-workspace/AMSMB2/Stream.swift:176:44: warning: capture of non-sendable type 'Seq.AsyncIterator.Type' in an isolated closure
174 | Task {
175 | do {
176 | while let data = try await iterator.next() {
| `- warning: capture of non-sendable type 'Seq.AsyncIterator.Type' in an isolated closure
177 | bufferLock.withLock {
178 | if self.buffer == nil {
/host/spi-builder-workspace/AMSMB2/Stream.swift:176:44: warning: capture of non-sendable type 'Seq.Type' in an isolated closure
174 | Task {
175 | do {
176 | while let data = try await iterator.next() {
| `- warning: capture of non-sendable type 'Seq.Type' in an isolated closure
177 | bufferLock.withLock {
178 | if self.buffer == nil {
/host/spi-builder-workspace/AMSMB2/Stream.swift:173:18: warning: capture of non-sendable type 'Seq.Type' in an isolated closure
171 | }
172 |
173 | private func prefetchData() {
| `- warning: capture of non-sendable type 'Seq.Type' in an isolated closure
174 | Task {
175 | do {
/host/spi-builder-workspace/AMSMB2/Stream.swift:174:9: error: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure
172 |
173 | private func prefetchData() {
174 | Task {
| `- error: passing closure as a 'sending' parameter risks causing data races between code in the current task and concurrent execution of the closure
175 | do {
176 | while let data = try await iterator.next() {
| `- note: closure captures 'self' which is accessible to code in the current task
177 | bufferLock.withLock {
178 | if self.buffer == nil {
[66/72] Compiling AMSMB2 AMSMB2.swift
/host/spi-builder-workspace/AMSMB2/AMSMB2.swift:496:66: error: cannot find 'O_RDONLY' in scope
494 | // `libsmb2` can not read symlink attributes using `stat`, so if we get
495 | // the related error, we simply open file as reparse point then use `fstat`.
496 | let file = try SMB2FileHandle(path: path, flags: O_RDONLY | O_SYMLINK, on: client)
| `- error: cannot find 'O_RDONLY' in scope
497 | stat = try file.fstat()
498 | }
/host/spi-builder-workspace/AMSMB2/AMSMB2.swift:770:66: error: cannot find 'O_RDONLY' in scope
768 | // `libsmb2` can not read symlink attributes using `stat`, so if we get
769 | // the related error, we simply open file as reparse point then use `fstat`.
770 | let file = try SMB2FileHandle(path: path, flags: O_RDONLY | O_SYMLINK, on: client)
| `- error: cannot find 'O_RDONLY' in scope
771 | stat = try file.fstat()
772 | }
/host/spi-builder-workspace/AMSMB2/AMSMB2.swift:1381:25: error: cannot find 'O_RDONLY' in scope
1379 | ) {
1380 | with(completionHandler: completionHandler) { client in
1381 | var flags = O_RDONLY | O_SYNC
| `- error: cannot find 'O_RDONLY' in scope
1382 | switch try client.stat(path).resourceType {
1383 | case .directory:
/host/spi-builder-workspace/AMSMB2/AMSMB2.swift:1381:36: error: cannot find 'O_SYNC' in scope
1379 | ) {
1380 | with(completionHandler: completionHandler) { client in
1381 | var flags = O_RDONLY | O_SYNC
| `- error: cannot find 'O_SYNC' in scope
1382 | switch try client.stat(path).resourceType {
1383 | case .directory:
/host/spi-builder-workspace/AMSMB2/AMSMB2.swift:1384:26: error: cannot find 'O_DIRECTORY' in scope
1382 | switch try client.stat(path).resourceType {
1383 | case .directory:
1384 | flags |= O_DIRECTORY
| `- error: cannot find 'O_DIRECTORY' in scope
1385 | case .link:
1386 | flags |= O_SYMLINK
/host/spi-builder-workspace/AMSMB2/Context.swift:624:25: error: cannot find type 'POSIXErrorCode' in scope
622 | }
623 |
624 | var posixErrorCode: POSIXErrorCode {
| `- error: cannot find type 'POSIXErrorCode' in scope
625 | .init(nterror_to_errno(rawValue))
626 | }
/host/spi-builder-workspace/AMSMB2/Context.swift:298:58: error: cannot find 'O_RDWR' in scope
296 |
297 | func symlink(_ path: String, to destination: String) throws {
298 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
| `- error: cannot find 'O_RDWR' in scope
299 | let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
300 | try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:298:67: error: cannot find 'O_CREAT' in scope
296 |
297 | func symlink(_ path: String, to destination: String) throws {
298 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
| `- error: cannot find 'O_CREAT' in scope
299 | let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
300 | try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:298:77: error: cannot find 'O_EXCL' in scope
296 |
297 | func symlink(_ path: String, to destination: String) throws {
298 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
| `- error: cannot find 'O_EXCL' in scope
299 | let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
300 | try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:298:98: error: cannot find 'O_SYNC' in scope
296 |
297 | func symlink(_ path: String, to destination: String) throws {
298 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
| `- error: cannot find 'O_SYNC' in scope
299 | let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
300 | try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:300:34: error: cannot infer contextual base in reference to member 'setReparsePoint'
298 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
299 | let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
300 | try file.fcntl(command: .setReparsePoint, args: reparse)
| `- error: cannot infer contextual base in reference to member 'setReparsePoint'
301 | }
302 | }
/host/spi-builder-workspace/AMSMB2/Context.swift:328:62: error: cannot find 'O_RDWR' in scope
326 | }
327 | case .link:
328 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_SYMLINK, on: self)
| `- error: cannot find 'O_RDWR' in scope
329 | try file.setInfo(smb2_file_disposition_info(delete_pending: 1), infoClass: .disposition)
330 | default:
/host/spi-builder-workspace/AMSMB2/Context.swift:329:89: error: cannot infer contextual base in reference to member 'disposition'
327 | case .link:
328 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_SYMLINK, on: self)
329 | try file.setInfo(smb2_file_disposition_info(delete_pending: 1), infoClass: .disposition)
| `- error: cannot infer contextual base in reference to member 'disposition'
330 | default:
331 | preconditionFailure("Not supported file type.")
/host/spi-builder-workspace/AMSMB2/Context.swift:367:23: error: cannot find 'pollfd' in scope
365 | let startDate = Date()
366 | while !cb.isFinished {
367 | var pfd = pollfd()
| `- error: cannot find 'pollfd' in scope
368 | pfd.fd = fileDescriptor
369 | pfd.events = try whichEvents()
/host/spi-builder-workspace/AMSMB2/Context.swift:371:31: error: cannot find 'poll' in scope
369 | pfd.events = try whichEvents()
370 |
371 | if pfd.fd < 0 || (poll(&pfd, 1, 1000) < 0 && errno != EAGAIN) {
| `- error: cannot find 'poll' in scope
372 | throw POSIXError(.init(errno), description: error)
373 | }
/host/spi-builder-workspace/AMSMB2/Context.swift:372:40: error: missing argument label 'rawValue:' in call
370 |
371 | if pfd.fd < 0 || (poll(&pfd, 1, 1000) < 0 && errno != EAGAIN) {
372 | throw POSIXError(.init(errno), description: error)
| `- error: missing argument label 'rawValue:' in call
373 | }
374 |
[67/72] Compiling AMSMB2 Context.swift
/host/spi-builder-workspace/AMSMB2/AMSMB2.swift:496:66: error: cannot find 'O_RDONLY' in scope
494 | // `libsmb2` can not read symlink attributes using `stat`, so if we get
495 | // the related error, we simply open file as reparse point then use `fstat`.
496 | let file = try SMB2FileHandle(path: path, flags: O_RDONLY | O_SYMLINK, on: client)
| `- error: cannot find 'O_RDONLY' in scope
497 | stat = try file.fstat()
498 | }
/host/spi-builder-workspace/AMSMB2/AMSMB2.swift:770:66: error: cannot find 'O_RDONLY' in scope
768 | // `libsmb2` can not read symlink attributes using `stat`, so if we get
769 | // the related error, we simply open file as reparse point then use `fstat`.
770 | let file = try SMB2FileHandle(path: path, flags: O_RDONLY | O_SYMLINK, on: client)
| `- error: cannot find 'O_RDONLY' in scope
771 | stat = try file.fstat()
772 | }
/host/spi-builder-workspace/AMSMB2/AMSMB2.swift:1381:25: error: cannot find 'O_RDONLY' in scope
1379 | ) {
1380 | with(completionHandler: completionHandler) { client in
1381 | var flags = O_RDONLY | O_SYNC
| `- error: cannot find 'O_RDONLY' in scope
1382 | switch try client.stat(path).resourceType {
1383 | case .directory:
/host/spi-builder-workspace/AMSMB2/AMSMB2.swift:1381:36: error: cannot find 'O_SYNC' in scope
1379 | ) {
1380 | with(completionHandler: completionHandler) { client in
1381 | var flags = O_RDONLY | O_SYNC
| `- error: cannot find 'O_SYNC' in scope
1382 | switch try client.stat(path).resourceType {
1383 | case .directory:
/host/spi-builder-workspace/AMSMB2/AMSMB2.swift:1384:26: error: cannot find 'O_DIRECTORY' in scope
1382 | switch try client.stat(path).resourceType {
1383 | case .directory:
1384 | flags |= O_DIRECTORY
| `- error: cannot find 'O_DIRECTORY' in scope
1385 | case .link:
1386 | flags |= O_SYMLINK
/host/spi-builder-workspace/AMSMB2/Context.swift:624:25: error: cannot find type 'POSIXErrorCode' in scope
622 | }
623 |
624 | var posixErrorCode: POSIXErrorCode {
| `- error: cannot find type 'POSIXErrorCode' in scope
625 | .init(nterror_to_errno(rawValue))
626 | }
/host/spi-builder-workspace/AMSMB2/Context.swift:298:58: error: cannot find 'O_RDWR' in scope
296 |
297 | func symlink(_ path: String, to destination: String) throws {
298 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
| `- error: cannot find 'O_RDWR' in scope
299 | let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
300 | try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:298:67: error: cannot find 'O_CREAT' in scope
296 |
297 | func symlink(_ path: String, to destination: String) throws {
298 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
| `- error: cannot find 'O_CREAT' in scope
299 | let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
300 | try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:298:77: error: cannot find 'O_EXCL' in scope
296 |
297 | func symlink(_ path: String, to destination: String) throws {
298 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
| `- error: cannot find 'O_EXCL' in scope
299 | let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
300 | try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:298:98: error: cannot find 'O_SYNC' in scope
296 |
297 | func symlink(_ path: String, to destination: String) throws {
298 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
| `- error: cannot find 'O_SYNC' in scope
299 | let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
300 | try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:300:34: error: cannot infer contextual base in reference to member 'setReparsePoint'
298 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
299 | let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
300 | try file.fcntl(command: .setReparsePoint, args: reparse)
| `- error: cannot infer contextual base in reference to member 'setReparsePoint'
301 | }
302 | }
/host/spi-builder-workspace/AMSMB2/Context.swift:328:62: error: cannot find 'O_RDWR' in scope
326 | }
327 | case .link:
328 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_SYMLINK, on: self)
| `- error: cannot find 'O_RDWR' in scope
329 | try file.setInfo(smb2_file_disposition_info(delete_pending: 1), infoClass: .disposition)
330 | default:
/host/spi-builder-workspace/AMSMB2/Context.swift:329:89: error: cannot infer contextual base in reference to member 'disposition'
327 | case .link:
328 | let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_SYMLINK, on: self)
329 | try file.setInfo(smb2_file_disposition_info(delete_pending: 1), infoClass: .disposition)
| `- error: cannot infer contextual base in reference to member 'disposition'
330 | default:
331 | preconditionFailure("Not supported file type.")
/host/spi-builder-workspace/AMSMB2/Context.swift:367:23: error: cannot find 'pollfd' in scope
365 | let startDate = Date()
366 | while !cb.isFinished {
367 | var pfd = pollfd()
| `- error: cannot find 'pollfd' in scope
368 | pfd.fd = fileDescriptor
369 | pfd.events = try whichEvents()
/host/spi-builder-workspace/AMSMB2/Context.swift:371:31: error: cannot find 'poll' in scope
369 | pfd.events = try whichEvents()
370 |
371 | if pfd.fd < 0 || (poll(&pfd, 1, 1000) < 0 && errno != EAGAIN) {
| `- error: cannot find 'poll' in scope
372 | throw POSIXError(.init(errno), description: error)
373 | }
/host/spi-builder-workspace/AMSMB2/Context.swift:372:40: error: missing argument label 'rawValue:' in call
370 |
371 | if pfd.fd < 0 || (poll(&pfd, 1, 1000) < 0 && errno != EAGAIN) {
372 | throw POSIXError(.init(errno), description: error)
| `- error: missing argument label 'rawValue:' in call
373 | }
374 |
[68/72] Compiling AMSMB2 MSRPC.swift
[69/72] Compiling AMSMB2 Fsctl.swift
BUILD FAILURE 6.2 android