Skip to content

Commit

Permalink
Fix SwiftWasm Glibc import issue (#76)
Browse files Browse the repository at this point in the history
SwiftWasm introduced its own WASI module awhile back, so we should
import that instead of Glibc to avoid potential issues.
  • Loading branch information
stephencelis authored Mar 4, 2024
1 parent b58e662 commit b13b1d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/XCTestDynamicOverlay/XCTFail.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ public struct XCTFailContext: Sendable {
return nil
}
#else
import Glibc
#if os(WASI)
import WASI
#else
import Glibc
#endif

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

0 comments on commit b13b1d1

Please sign in to comment.