File tree 1 file changed +10
-1
lines changed
Sources/SwiftLibraryPluginProvider
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ private import _SwiftLibraryPluginProviderCShims
18
18
// because we don't want other modules depend on 'WinSDK'.
19
19
#if canImport(Darwin)
20
20
private import Darwin
21
+ #elseif canImport(Android)
22
+ private import Android
21
23
#elseif canImport(Glibc)
22
24
private import Glibc
23
25
#elseif canImport(Musl)
@@ -29,6 +31,8 @@ import SwiftSyntaxMacros
29
31
@_implementationOnly import _SwiftLibraryPluginProviderCShims
30
32
#if canImport(Darwin)
31
33
@_implementationOnly import Darwin
34
+ #elseif canImport(Android)
35
+ @_implementationOnly import Android
32
36
#elseif canImport(Glibc)
33
37
@_implementationOnly import Glibc
34
38
#elseif canImport(Musl)
@@ -137,7 +141,12 @@ private func _loadLibrary(_ path: String) throws -> UnsafeMutableRawPointer {
137
141
#else
138
142
private func _loadLibrary( _ path: String ) throws -> UnsafeMutableRawPointer {
139
143
guard let dlHandle = dlopen ( path, RTLD_LAZY | RTLD_LOCAL) else {
140
- throw LibraryPluginError ( message: " loader error: \( String ( cString: dlerror ( ) ) ) " )
144
+ #if canImport(Android)
145
+ let err = dlerror ( ) !
146
+ #else
147
+ let err = dlerror ( )
148
+ #endif
149
+ throw LibraryPluginError ( message: " loader error: \( String ( cString: err) ) " )
141
150
}
142
151
return dlHandle
143
152
}
You can’t perform that action at this time.
0 commit comments