The Swift Package Index logo.Swift Package Index

Build Information

Failed to build AMSMB2, reference master (f1c589), with Swift 6.1 for Android on 23 Apr 2026 06:06:17 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1

Build Log

========================================
RunAll
========================================
Builder version: 4.70.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/amosavian/AMSMB2.git
Reference: master
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
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> origin/master
HEAD is now at f1c5898 Move directory/no-buffering guard into CreateOptions.init
Submodule path 'Dependencies/libsmb2': checked out 'd2c698619024b08569701b35a6f6dad2b226685f'
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 @):
f1c589855407967a302766a5cf4e27e1ccf49caf
SUCCESS checkout https://github.com/amosavian/AMSMB2.git at master
========================================
Build
========================================
Selected platform:         android
Swift version:             6.1
Building package at path:  $PWD
https://github.com/amosavian/AMSMB2.git
https://github.com/amosavian/AMSMB2.git
WARNING: environment variable SUPPRESS_SWIFT_6_FLAGS is not set
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 -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
android-6.1-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:d37fe7b8fba27dae59fb1d9d7dfa86b38b41ffb3975924aad6f05cb4cc3de131
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:android-6.1-latest
Fetching https://github.com/apple/swift-atomics.git
[1/1820] Fetching swift-atomics
Fetched https://github.com/apple/swift-atomics.git from cache (0.41s)
Computing version for https://github.com/apple/swift-atomics.git
Computed https://github.com/apple/swift-atomics.git at 1.3.0 (1.39s)
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 aes.c
[2/60] Compiling compat.c
[3/60] Compiling hmac.c
[3/60] Compiling hmac-md5.c
[5/60] Compiling aes128ccm.c
[6/60] Compiling usha.c
[7/60] Compiling timestamps.c
[8/60] Compiling errors.c
[9/60] Compiling spnego-wrapper.c
[10/60] Compiling unicode.c
[11/60] Compiling dcerpc.c
[12/60] Compiling sync.c
[13/60] Compiling smb3-seal.c
[14/60] Compiling smb2-share-enum.c
[15/60] Compiling smb2-data-reparse-point.c
[16/60] Compiling smb2-data-filesystem-info.c
[17/60] Compiling smb2-signing.c
[18/60] Compiling socket.c
[19/60] Compiling smb2-data-security-descriptor.c
[20/60] Compiling smb2-cmd-write.c
[20/60] Compiling smb2-cmd-tree-disconnect.c
[22/60] Compiling smb2-cmd-tree-connect.c
[23/60] Write swift-version-24593BA9C3E375BF.txt
[24/60] Compiling smb2-data-file-info.c
[25/60] Compiling smb2-cmd-set-info.c
[26/60] Compiling smb2-cmd-session-setup.c
[27/60] Compiling smb2-cmd-read.c
[28/60] Compiling smb2-cmd-notify-change.c
[29/60] Compiling smb2-cmd-query-info.c
[30/60] Compiling smb2-cmd-oplock-break.c
[31/60] Compiling smb2-cmd-ioctl.c
[32/60] Compiling smb2-cmd-logoff.c
[32/60] Compiling smb2-cmd-negotiate.c
[34/60] Compiling smb2-cmd-query-directory.c
[35/60] Compiling smb2-cmd-lock.c
[36/60] Compiling sha384-512.c
[37/60] Compiling sha224-256.c
[38/60] Compiling sha1.c
[39/60] Compiling smb2-cmd-create.c
[40/60] Compiling smb2-cmd-echo.c
[41/60] Compiling smb2-cmd-error.c
[41/60] Compiling smb2-cmd-close.c
[42/60] Compiling smb2-cmd-flush.c
[44/60] Compiling krb5-wrapper.c
[45/60] Compiling md5.c
[46/60] Compiling md4c.c
[47/60] Compiling pdu.c
[48/60] Compiling dcerpc-srvsvc.c
[49/60] Write sources
[50/60] Compiling ntlmssp.c
[51/60] Compiling aes_reference.c
[52/60] Compiling alloc.c
[53/60] Compiling asn1-ber.c
[54/60] Compiling dcerpc-lsa.c
[55/60] Compiling init.c
[56/60] Compiling libsmb2.c
[58/71] Compiling AMSMB2 MSRPC.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[59/72] Compiling AMSMB2 Fsctl.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[60/72] Compiling AMSMB2 Parsers.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
[61/72] Compiling AMSMB2 ObjCCompat.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
error: emit-module command failed with exit code 1 (use -v to see invocation)
[62/72] Emitting module AMSMB2
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/host/spi-builder-workspace/AMSMB2/Context.swift:623:25: error: cannot find type 'POSIXErrorCode' in scope
621 |     }
622 |
623 |     var posixErrorCode: POSIXErrorCode {
    |                         `- error: cannot find type 'POSIXErrorCode' in scope
624 |         .init(nterror_to_errno(rawValue))
625 |     }
/host/spi-builder-workspace/AMSMB2/Extensions.swift:76:11: error: cannot find type 'POSIXErrorCode' in scope
 74 | }
 75 |
 76 | extension POSIXErrorCode {
    |           `- error: cannot find type 'POSIXErrorCode' in scope
 77 |     init(_ code: Int32) {
 78 |         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 {
[63/72] Compiling AMSMB2 AMSMB2.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/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:623:25: error: cannot find type 'POSIXErrorCode' in scope
621 |     }
622 |
623 |     var posixErrorCode: POSIXErrorCode {
    |                         `- error: cannot find type 'POSIXErrorCode' in scope
624 |         .init(nterror_to_errno(rawValue))
625 |     }
/host/spi-builder-workspace/AMSMB2/Context.swift:297:58: error: cannot find 'O_RDWR' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:297:67: error: cannot find 'O_CREAT' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:297:77: error: cannot find 'O_EXCL' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:297:98: error: cannot find 'O_SYNC' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:299:34: error: cannot infer contextual base in reference to member 'setReparsePoint'
297 |         let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
    |                                  `- error: cannot infer contextual base in reference to member 'setReparsePoint'
300 |     }
301 | }
/host/spi-builder-workspace/AMSMB2/Context.swift:327:62: error: cannot find 'O_RDWR' in scope
325 |             }
326 |         case .link:
327 |             let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_SYMLINK, on: self)
    |                                                              `- error: cannot find 'O_RDWR' in scope
328 |             try file.setInfo(smb2_file_disposition_info(delete_pending: 1), infoClass: .disposition)
329 |         default:
/host/spi-builder-workspace/AMSMB2/Context.swift:328:89: error: cannot infer contextual base in reference to member 'disposition'
326 |         case .link:
327 |             let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_SYMLINK, on: self)
328 |             try file.setInfo(smb2_file_disposition_info(delete_pending: 1), infoClass: .disposition)
    |                                                                                         `- error: cannot infer contextual base in reference to member 'disposition'
329 |         default:
330 |             preconditionFailure("Not supported file type.")
/host/spi-builder-workspace/AMSMB2/Context.swift:366:23: error: cannot find 'pollfd' in scope
364 |         let startDate = Date()
365 |         while !cb.isFinished {
366 |             var pfd = pollfd()
    |                       `- error: cannot find 'pollfd' in scope
367 |             pfd.fd = fileDescriptor
368 |             pfd.events = try whichEvents()
/host/spi-builder-workspace/AMSMB2/Context.swift:370:31: error: cannot find 'poll' in scope
368 |             pfd.events = try whichEvents()
369 |
370 |             if pfd.fd < 0 || (poll(&pfd, 1, 1000) < 0 && errno != EAGAIN) {
    |                               `- error: cannot find 'poll' in scope
371 |                 throw POSIXError(.init(errno), description: error)
372 |             }
/host/spi-builder-workspace/AMSMB2/Context.swift:371:40: error: missing argument label 'rawValue:' in call
369 |
370 |             if pfd.fd < 0 || (poll(&pfd, 1, 1000) < 0 && errno != EAGAIN) {
371 |                 throw POSIXError(.init(errno), description: error)
    |                                        `- error: missing argument label 'rawValue:' in call
372 |             }
373 |
[64/72] Compiling AMSMB2 Context.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/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:623:25: error: cannot find type 'POSIXErrorCode' in scope
621 |     }
622 |
623 |     var posixErrorCode: POSIXErrorCode {
    |                         `- error: cannot find type 'POSIXErrorCode' in scope
624 |         .init(nterror_to_errno(rawValue))
625 |     }
/host/spi-builder-workspace/AMSMB2/Context.swift:297:58: error: cannot find 'O_RDWR' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:297:67: error: cannot find 'O_CREAT' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:297:77: error: cannot find 'O_EXCL' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:297:98: error: cannot find 'O_SYNC' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:299:34: error: cannot infer contextual base in reference to member 'setReparsePoint'
297 |         let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
    |                                  `- error: cannot infer contextual base in reference to member 'setReparsePoint'
300 |     }
301 | }
/host/spi-builder-workspace/AMSMB2/Context.swift:327:62: error: cannot find 'O_RDWR' in scope
325 |             }
326 |         case .link:
327 |             let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_SYMLINK, on: self)
    |                                                              `- error: cannot find 'O_RDWR' in scope
328 |             try file.setInfo(smb2_file_disposition_info(delete_pending: 1), infoClass: .disposition)
329 |         default:
/host/spi-builder-workspace/AMSMB2/Context.swift:328:89: error: cannot infer contextual base in reference to member 'disposition'
326 |         case .link:
327 |             let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_SYMLINK, on: self)
328 |             try file.setInfo(smb2_file_disposition_info(delete_pending: 1), infoClass: .disposition)
    |                                                                                         `- error: cannot infer contextual base in reference to member 'disposition'
329 |         default:
330 |             preconditionFailure("Not supported file type.")
/host/spi-builder-workspace/AMSMB2/Context.swift:366:23: error: cannot find 'pollfd' in scope
364 |         let startDate = Date()
365 |         while !cb.isFinished {
366 |             var pfd = pollfd()
    |                       `- error: cannot find 'pollfd' in scope
367 |             pfd.fd = fileDescriptor
368 |             pfd.events = try whichEvents()
/host/spi-builder-workspace/AMSMB2/Context.swift:370:31: error: cannot find 'poll' in scope
368 |             pfd.events = try whichEvents()
369 |
370 |             if pfd.fd < 0 || (poll(&pfd, 1, 1000) < 0 && errno != EAGAIN) {
    |                               `- error: cannot find 'poll' in scope
371 |                 throw POSIXError(.init(errno), description: error)
372 |             }
/host/spi-builder-workspace/AMSMB2/Context.swift:371:40: error: missing argument label 'rawValue:' in call
369 |
370 |             if pfd.fd < 0 || (poll(&pfd, 1, 1000) < 0 && errno != EAGAIN) {
371 |                 throw POSIXError(.init(errno), description: error)
    |                                        `- error: missing argument label 'rawValue:' in call
372 |             }
373 |
[65/72] Compiling AMSMB2 Directory.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/host/spi-builder-workspace/AMSMB2/Extensions.swift:76:11: error: cannot find type 'POSIXErrorCode' in scope
 74 | }
 75 |
 76 | extension POSIXErrorCode {
    |           `- error: cannot find type 'POSIXErrorCode' in scope
 77 |     init(_ code: Int32) {
 78 |         self = POSIXErrorCode(rawValue: code) ?? .ECANCELED
/host/spi-builder-workspace/AMSMB2/Extensions.swift:57:32: error: missing argument label 'rawValue:' in call
 55 |         let errno = Int32(-result)
 56 |         let errorDesc = description.map { "Error code \(errno): \($0)" }
 57 |         throw POSIXError(.init(errno), description: errorDesc)
    |                                `- error: missing argument label 'rawValue:' in call
 58 |     }
 59 |
/host/spi-builder-workspace/AMSMB2/Context.swift:623:25: error: cannot find type 'POSIXErrorCode' in scope
621 |     }
622 |
623 |     var posixErrorCode: POSIXErrorCode {
    |                         `- error: cannot find type 'POSIXErrorCode' in scope
624 |         .init(nterror_to_errno(rawValue))
625 |     }
[66/72] Compiling AMSMB2 Extensions.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/host/spi-builder-workspace/AMSMB2/Extensions.swift:76:11: error: cannot find type 'POSIXErrorCode' in scope
 74 | }
 75 |
 76 | extension POSIXErrorCode {
    |           `- error: cannot find type 'POSIXErrorCode' in scope
 77 |     init(_ code: Int32) {
 78 |         self = POSIXErrorCode(rawValue: code) ?? .ECANCELED
/host/spi-builder-workspace/AMSMB2/Extensions.swift:57:32: error: missing argument label 'rawValue:' in call
 55 |         let errno = Int32(-result)
 56 |         let errorDesc = description.map { "Error code \(errno): \($0)" }
 57 |         throw POSIXError(.init(errno), description: errorDesc)
    |                                `- error: missing argument label 'rawValue:' in call
 58 |     }
 59 |
/host/spi-builder-workspace/AMSMB2/Context.swift:623:25: error: cannot find type 'POSIXErrorCode' in scope
621 |     }
622 |
623 |     var posixErrorCode: POSIXErrorCode {
    |                         `- error: cannot find type 'POSIXErrorCode' in scope
624 |         .init(nterror_to_errno(rawValue))
625 |     }
[67/72] Compiling AMSMB2 FileHandle.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/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:40: error: cannot find 'O_DIRECTORY' in scope
629 |         init(flags: Int32) {
630 |             self = []
631 |             let isDirectory = (flags & O_DIRECTORY) != 0
    |                                        `- error: cannot find 'O_DIRECTORY' in scope
632 |             if isDirectory {
633 |                 insert(.directoryFile)
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:642:25: error: cannot find 'O_SYNC' in scope
640 |             // when O_DIRECTORY is also set so callers don't have to
641 |             // remember the constraint at every directory open site.
642 |             if (flags & O_SYNC) != 0 && !isDirectory {
    |                         `- error: cannot find 'O_SYNC' in scope
643 |                 insert(.noIntermediateBuffering)
644 |             }
[68/72] Compiling AMSMB2 FileMonitoring.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
/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:40: error: cannot find 'O_DIRECTORY' in scope
629 |         init(flags: Int32) {
630 |             self = []
631 |             let isDirectory = (flags & O_DIRECTORY) != 0
    |                                        `- error: cannot find 'O_DIRECTORY' in scope
632 |             if isDirectory {
633 |                 insert(.directoryFile)
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:642:25: error: cannot find 'O_SYNC' in scope
640 |             // when O_DIRECTORY is also set so callers don't have to
641 |             // remember the constraint at every directory open site.
642 |             if (flags & O_SYNC) != 0 && !isDirectory {
    |                         `- error: cannot find 'O_SYNC' in scope
643 |                 insert(.noIntermediateBuffering)
644 |             }
[69/72] Compiling AMSMB2 Stream.swift
<unknown>:0: warning: upcoming feature 'InferSendableFromCaptures' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'GlobalActorIsolatedTypesUsability' is already enabled as of Swift version 6
<unknown>:0: warning: upcoming feature 'DisableOutwardActorInference' is already enabled as of Swift version 6
Running build ...
bash -c docker run --pull=always --rm -v "checkouts-4606859-2":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/swiftpackageindex/spi-images:android-6.1-latest swift build --swift-sdk aarch64-unknown-linux-android24 2>&1
android-6.1-latest: Pulling from swiftpackageindex/spi-images
Digest: sha256:d37fe7b8fba27dae59fb1d9d7dfa86b38b41ffb3975924aad6f05cb4cc3de131
Status: Image is up to date for registry.gitlab.com/swiftpackageindex/spi-images:android-6.1-latest
[0/1] Planning build
Building for debugging...
[0/4] Write swift-version-24593BA9C3E375BF.txt
[2/15] Compiling AMSMB2 ObjCCompat.swift
[3/16] Compiling AMSMB2 Parsers.swift
[4/16] Compiling AMSMB2 Directory.swift
/host/spi-builder-workspace/AMSMB2/Extensions.swift:76:11: error: cannot find type 'POSIXErrorCode' in scope
 74 | }
 75 |
 76 | extension POSIXErrorCode {
    |           `- error: cannot find type 'POSIXErrorCode' in scope
 77 |     init(_ code: Int32) {
 78 |         self = POSIXErrorCode(rawValue: code) ?? .ECANCELED
/host/spi-builder-workspace/AMSMB2/Extensions.swift:57:32: error: missing argument label 'rawValue:' in call
 55 |         let errno = Int32(-result)
 56 |         let errorDesc = description.map { "Error code \(errno): \($0)" }
 57 |         throw POSIXError(.init(errno), description: errorDesc)
    |                                `- error: missing argument label 'rawValue:' in call
 58 |     }
 59 |
/host/spi-builder-workspace/AMSMB2/Context.swift:623:25: error: cannot find type 'POSIXErrorCode' in scope
621 |     }
622 |
623 |     var posixErrorCode: POSIXErrorCode {
    |                         `- error: cannot find type 'POSIXErrorCode' in scope
624 |         .init(nterror_to_errno(rawValue))
625 |     }
[5/16] Compiling AMSMB2 Extensions.swift
/host/spi-builder-workspace/AMSMB2/Extensions.swift:76:11: error: cannot find type 'POSIXErrorCode' in scope
 74 | }
 75 |
 76 | extension POSIXErrorCode {
    |           `- error: cannot find type 'POSIXErrorCode' in scope
 77 |     init(_ code: Int32) {
 78 |         self = POSIXErrorCode(rawValue: code) ?? .ECANCELED
/host/spi-builder-workspace/AMSMB2/Extensions.swift:57:32: error: missing argument label 'rawValue:' in call
 55 |         let errno = Int32(-result)
 56 |         let errorDesc = description.map { "Error code \(errno): \($0)" }
 57 |         throw POSIXError(.init(errno), description: errorDesc)
    |                                `- error: missing argument label 'rawValue:' in call
 58 |     }
 59 |
/host/spi-builder-workspace/AMSMB2/Context.swift:623:25: error: cannot find type 'POSIXErrorCode' in scope
621 |     }
622 |
623 |     var posixErrorCode: POSIXErrorCode {
    |                         `- error: cannot find type 'POSIXErrorCode' in scope
624 |         .init(nterror_to_errno(rawValue))
625 |     }
[6/16] Compiling AMSMB2 MSRPC.swift
[7/16] 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:40: error: cannot find 'O_DIRECTORY' in scope
629 |         init(flags: Int32) {
630 |             self = []
631 |             let isDirectory = (flags & O_DIRECTORY) != 0
    |                                        `- error: cannot find 'O_DIRECTORY' in scope
632 |             if isDirectory {
633 |                 insert(.directoryFile)
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:642:25: error: cannot find 'O_SYNC' in scope
640 |             // when O_DIRECTORY is also set so callers don't have to
641 |             // remember the constraint at every directory open site.
642 |             if (flags & O_SYNC) != 0 && !isDirectory {
    |                         `- error: cannot find 'O_SYNC' in scope
643 |                 insert(.noIntermediateBuffering)
644 |             }
[8/16] 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:40: error: cannot find 'O_DIRECTORY' in scope
629 |         init(flags: Int32) {
630 |             self = []
631 |             let isDirectory = (flags & O_DIRECTORY) != 0
    |                                        `- error: cannot find 'O_DIRECTORY' in scope
632 |             if isDirectory {
633 |                 insert(.directoryFile)
/host/spi-builder-workspace/AMSMB2/FileHandle.swift:642:25: error: cannot find 'O_SYNC' in scope
640 |             // when O_DIRECTORY is also set so callers don't have to
641 |             // remember the constraint at every directory open site.
642 |             if (flags & O_SYNC) != 0 && !isDirectory {
    |                         `- error: cannot find 'O_SYNC' in scope
643 |                 insert(.noIntermediateBuffering)
644 |             }
[9/16] Compiling AMSMB2 Stream.swift
[10/16] Compiling AMSMB2 Fsctl.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[11/16] Emitting module AMSMB2
/host/spi-builder-workspace/AMSMB2/Context.swift:623:25: error: cannot find type 'POSIXErrorCode' in scope
621 |     }
622 |
623 |     var posixErrorCode: POSIXErrorCode {
    |                         `- error: cannot find type 'POSIXErrorCode' in scope
624 |         .init(nterror_to_errno(rawValue))
625 |     }
/host/spi-builder-workspace/AMSMB2/Extensions.swift:76:11: error: cannot find type 'POSIXErrorCode' in scope
 74 | }
 75 |
 76 | extension POSIXErrorCode {
    |           `- error: cannot find type 'POSIXErrorCode' in scope
 77 |     init(_ code: Int32) {
 78 |         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 {
[12/16] 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:623:25: error: cannot find type 'POSIXErrorCode' in scope
621 |     }
622 |
623 |     var posixErrorCode: POSIXErrorCode {
    |                         `- error: cannot find type 'POSIXErrorCode' in scope
624 |         .init(nterror_to_errno(rawValue))
625 |     }
/host/spi-builder-workspace/AMSMB2/Context.swift:297:58: error: cannot find 'O_RDWR' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:297:67: error: cannot find 'O_CREAT' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:297:77: error: cannot find 'O_EXCL' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:297:98: error: cannot find 'O_SYNC' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:299:34: error: cannot infer contextual base in reference to member 'setReparsePoint'
297 |         let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
    |                                  `- error: cannot infer contextual base in reference to member 'setReparsePoint'
300 |     }
301 | }
/host/spi-builder-workspace/AMSMB2/Context.swift:327:62: error: cannot find 'O_RDWR' in scope
325 |             }
326 |         case .link:
327 |             let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_SYMLINK, on: self)
    |                                                              `- error: cannot find 'O_RDWR' in scope
328 |             try file.setInfo(smb2_file_disposition_info(delete_pending: 1), infoClass: .disposition)
329 |         default:
/host/spi-builder-workspace/AMSMB2/Context.swift:328:89: error: cannot infer contextual base in reference to member 'disposition'
326 |         case .link:
327 |             let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_SYMLINK, on: self)
328 |             try file.setInfo(smb2_file_disposition_info(delete_pending: 1), infoClass: .disposition)
    |                                                                                         `- error: cannot infer contextual base in reference to member 'disposition'
329 |         default:
330 |             preconditionFailure("Not supported file type.")
/host/spi-builder-workspace/AMSMB2/Context.swift:366:23: error: cannot find 'pollfd' in scope
364 |         let startDate = Date()
365 |         while !cb.isFinished {
366 |             var pfd = pollfd()
    |                       `- error: cannot find 'pollfd' in scope
367 |             pfd.fd = fileDescriptor
368 |             pfd.events = try whichEvents()
/host/spi-builder-workspace/AMSMB2/Context.swift:370:31: error: cannot find 'poll' in scope
368 |             pfd.events = try whichEvents()
369 |
370 |             if pfd.fd < 0 || (poll(&pfd, 1, 1000) < 0 && errno != EAGAIN) {
    |                               `- error: cannot find 'poll' in scope
371 |                 throw POSIXError(.init(errno), description: error)
372 |             }
/host/spi-builder-workspace/AMSMB2/Context.swift:371:40: error: missing argument label 'rawValue:' in call
369 |
370 |             if pfd.fd < 0 || (poll(&pfd, 1, 1000) < 0 && errno != EAGAIN) {
371 |                 throw POSIXError(.init(errno), description: error)
    |                                        `- error: missing argument label 'rawValue:' in call
372 |             }
373 |
[13/16] 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:623:25: error: cannot find type 'POSIXErrorCode' in scope
621 |     }
622 |
623 |     var posixErrorCode: POSIXErrorCode {
    |                         `- error: cannot find type 'POSIXErrorCode' in scope
624 |         .init(nterror_to_errno(rawValue))
625 |     }
/host/spi-builder-workspace/AMSMB2/Context.swift:297:58: error: cannot find 'O_RDWR' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:297:67: error: cannot find 'O_CREAT' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:297:77: error: cannot find 'O_EXCL' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:297:98: error: cannot find 'O_SYNC' in scope
295 |
296 |     func symlink(_ path: String, to destination: String) throws {
297 |         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
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
/host/spi-builder-workspace/AMSMB2/Context.swift:299:34: error: cannot infer contextual base in reference to member 'setReparsePoint'
297 |         let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_CREAT | O_EXCL | O_SYMLINK | O_SYNC, on: self)
298 |         let reparse = IOCtl.SymbolicLinkReparse(path: destination, isRelative: true)
299 |         try file.fcntl(command: .setReparsePoint, args: reparse)
    |                                  `- error: cannot infer contextual base in reference to member 'setReparsePoint'
300 |     }
301 | }
/host/spi-builder-workspace/AMSMB2/Context.swift:327:62: error: cannot find 'O_RDWR' in scope
325 |             }
326 |         case .link:
327 |             let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_SYMLINK, on: self)
    |                                                              `- error: cannot find 'O_RDWR' in scope
328 |             try file.setInfo(smb2_file_disposition_info(delete_pending: 1), infoClass: .disposition)
329 |         default:
/host/spi-builder-workspace/AMSMB2/Context.swift:328:89: error: cannot infer contextual base in reference to member 'disposition'
326 |         case .link:
327 |             let file = try SMB2FileHandle(path: path, flags: O_RDWR | O_SYMLINK, on: self)
328 |             try file.setInfo(smb2_file_disposition_info(delete_pending: 1), infoClass: .disposition)
    |                                                                                         `- error: cannot infer contextual base in reference to member 'disposition'
329 |         default:
330 |             preconditionFailure("Not supported file type.")
/host/spi-builder-workspace/AMSMB2/Context.swift:366:23: error: cannot find 'pollfd' in scope
364 |         let startDate = Date()
365 |         while !cb.isFinished {
366 |             var pfd = pollfd()
    |                       `- error: cannot find 'pollfd' in scope
367 |             pfd.fd = fileDescriptor
368 |             pfd.events = try whichEvents()
/host/spi-builder-workspace/AMSMB2/Context.swift:370:31: error: cannot find 'poll' in scope
368 |             pfd.events = try whichEvents()
369 |
370 |             if pfd.fd < 0 || (poll(&pfd, 1, 1000) < 0 && errno != EAGAIN) {
    |                               `- error: cannot find 'poll' in scope
371 |                 throw POSIXError(.init(errno), description: error)
372 |             }
/host/spi-builder-workspace/AMSMB2/Context.swift:371:40: error: missing argument label 'rawValue:' in call
369 |
370 |             if pfd.fd < 0 || (poll(&pfd, 1, 1000) < 0 && errno != EAGAIN) {
371 |                 throw POSIXError(.init(errno), description: error)
    |                                        `- error: missing argument label 'rawValue:' in call
372 |             }
373 |
BUILD FAILURE 6.1 android