Skip to content

Commit 34b9882

Browse files
committed
[unittest] Disambiguate references to errno
In Xcode 16 SDKs there seem to be two `errno` visible for some files, one in the `Darwin` module, and one in the `_errno` module (which seems new for this Xcode version). Disambiguate the references by prepending `Darwin`, which should be the one that was being used before Xcode 16 SDKs.
1 parent 4db04f9 commit 34b9882

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stdlib/private/StdlibUnittest/StdlibUnittest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ class _ParentProcess {
11061106
var ret: CInt
11071107
repeat {
11081108
ret = _stdlib_select(&readfds, &writefds, &errorfds, nil)
1109-
} while ret == -1 && errno == EINTR
1109+
} while ret == -1 && Darwin.errno == EINTR
11101110
if ret <= 0 {
11111111
fatalError("select() returned an error")
11121112
}

stdlib/private/SwiftReflectionTest/SwiftReflectionTest.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ internal func sendReflectionInfos() {
303303

304304
internal func printErrnoAndExit() {
305305
debugLog("BEGIN \(#function)"); defer { debugLog("END \(#function)") }
306-
let errorCString = strerror(errno)!
306+
let errorCString = strerror(Darwin.errno)!
307307
let message = String(validatingCString: errorCString)! + "\n"
308308
let bytes = Array(message.utf8)
309309
fwrite(bytes, 1, bytes.count, stderr)

0 commit comments

Comments
 (0)