Skip to content

Commit b13b1d1

Browse files
authored
Fix SwiftWasm Glibc import issue (#76)
SwiftWasm introduced its own WASI module awhile back, so we should import that instead of Glibc to avoid potential issues.
1 parent b58e662 commit b13b1d1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/XCTestDynamicOverlay/XCTFail.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,11 @@ public struct XCTFailContext: Sendable {
181181
return nil
182182
}
183183
#else
184-
import Glibc
184+
#if os(WASI)
185+
import WASI
186+
#else
187+
import Glibc
188+
#endif
185189

186190
private func ResolveXCTFail() -> XCTFailType? {
187191
var hXCTest = dlopen("libXCTest.so", RTLD_NOW)

0 commit comments

Comments
 (0)