File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Sources/Testing/SourceAttribution Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public struct Backtrace: Sendable {
4040 self . addresses = addresses. map { Address ( UInt ( bitPattern: $0) ) }
4141 }
4242
43- #if os(Android ) && !SWT_NO_DYNAMIC_LINKING
43+ #if compiler(<6.3 ) && os(Android)
4444 /// The `backtrace()` function.
4545 ///
4646 /// This function was added to Android with API level 33, which is higher than
@@ -76,7 +76,13 @@ public struct Backtrace: Sendable {
7676 initializedCount = . init( clamping: backtrace ( addresses. baseAddress!, . init( clamping: addresses. count) ) )
7777 }
7878#elseif os(Android)
79- #if !SWT_NO_DYNAMIC_LINKING
79+ #if compiler(>=6.3)
80+ if #available( Android 33 , * ) {
81+ initializedCount = addresses. withMemoryRebound ( to: UnsafeMutableRawPointer . self) { addresses in
82+ . init( clamping: backtrace ( addresses. baseAddress!, . init( clamping: addresses. count) ) )
83+ }
84+ }
85+ #else
8086 if let _backtrace {
8187 initializedCount = . init( clamping: _backtrace ( addresses. baseAddress!, . init( clamping: addresses. count) ) )
8288 }
You can’t perform that action at this time.
0 commit comments