Skip to content

Commit 6302233

Browse files
authored
[unittest] Disambiguate references to errno (#77155)
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 c43c0cc commit 6302233

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

stdlib/private/StdlibUnittest/StdlibUnittest.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import SwiftPrivateLibcExtras
2020
import Foundation
2121
#endif
2222
import Darwin
23+
import var Darwin.errno
2324
#elseif canImport(Glibc)
2425
import Glibc
2526
#elseif canImport(Musl)
@@ -1106,7 +1107,7 @@ class _ParentProcess {
11061107
var ret: CInt
11071108
repeat {
11081109
ret = _stdlib_select(&readfds, &writefds, &errorfds, nil)
1109-
} while ret == -1 && errno == EINTR
1110+
} while ret == -1 && errno == EINTR
11101111
if ret <= 0 {
11111112
fatalError("select() returned an error")
11121113
}

stdlib/private/SwiftReflectionTest/SwiftReflectionTest.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ let RequestPointerSize = "p"
3131
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) || os(visionOS)
3232
import MachO
3333
import Darwin
34+
import var Darwin.errno
3435

3536
#if arch(x86_64) || arch(arm64)
3637
typealias MachHeader = mach_header_64

0 commit comments

Comments
 (0)