Skip to content

Commit 82017ab

Browse files
committed
Fix build failures on macOS self-hosted
1 parent a30d76d commit 82017ab

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/swift-test/Entrypoint.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import Commands
1414
#if canImport(Darwin.C)
15-
private import Darwin.C
15+
import Darwin.C
1616
#endif
1717

1818
@main
@@ -26,7 +26,11 @@ struct Entrypoint {
2626
let bundlePath = args[2]
2727
guard let image = dlopen(bundlePath, RTLD_LAZY) else {
2828
let errorMessage: String = dlerror().flatMap {
29+
#if compiler(>=6)
2930
String(validatingCString: $0)
31+
#else
32+
String(validatingUTF8: $0)
33+
#endif
3034
} ?? "An unknown error occurred."
3135
fatalError("Failed to open test bundle at path \(bundlePath): \(errorMessage)")
3236
}

0 commit comments

Comments
 (0)