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 @@ -22,6 +22,8 @@ private import Darwin
22
22
private import Glibc
23
23
#elseif canImport(Musl)
24
24
private import Musl
25
+ #elseif canImport(Android)
26
+ private import Android
25
27
#endif
26
28
#else
27
29
import SwiftSyntaxMacros
@@ -33,6 +35,8 @@ import SwiftSyntaxMacros
33
35
@_implementationOnly import Glibc
34
36
#elseif canImport(Musl)
35
37
@_implementationOnly import Musl
38
+ #elseif canImport(Android)
39
+ @_implementationOnly import Android
36
40
#endif
37
41
#endif
38
42
@@ -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