Skip to content

Commit 28fc81d

Browse files
committed
Fix Android builds with NDK r28 and later
The nullability annotations of many POSIX functions changed in r28. Also switch the CI to test with both the latest LTS version (r27d) and the latest stable version (r29).
1 parent 40b3fdc commit 28fc81d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/pull_request.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
macos_build_command: 'xcrun swift-format lint -s -r --configuration ./.swift-format . && xcrun swift test && xcrun swift test -c release && xcrun swift test --disable-default-traits'
4040
enable_linux_static_sdk_build: true
4141
enable_android_sdk_build: true
42+
android_ndk_version: '["r27d", "r29"]'
4243
linux_static_sdk_versions: '["6.1", "nightly-6.2"]'
4344
linux_static_sdk_build_command: |
4445
for triple in aarch64-swift-linux-musl x86_64-swift-linux-musl ; do

Sources/Subprocess/Thread.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ internal func pthread_create(
318318
return context
319319
}
320320
#elseif canImport(Bionic)
321-
func proc(_ context: UnsafeMutableRawPointer) -> UnsafeMutableRawPointer {
321+
func proc(_ context: UnsafeMutableRawPointer!) -> UnsafeMutableRawPointer! {
322322
(Unmanaged<AnyObject>.fromOpaque(context).takeRetainedValue() as! Context).body()
323323
return context
324324
}

0 commit comments

Comments
 (0)