Skip to content

Commit

Permalink
Remove upstreamed NIO patches from the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
finagolfin committed Dec 1, 2024
1 parent 3493a85 commit 5a033bf
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 139 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ jobs:
- name: Build Swift NIO package
run: |
cd swift-nio
git apply ../sdk-config/swift-nio-disable-ecn-tests.patch ../sdk-config/swift-nio-filesystem.patch ../sdk-config/swift-nio-ndk27.patch
git apply ../sdk-config/swift-nio-disable-ecn-tests.patch ../sdk-config/swift-nio-filesystem.patch
${TOOLCHAIN}/bin/swift build --build-tests ${SWIFTPM_FLAGS}
- name: Get Swift Numerics package
uses: actions/checkout@v4
Expand Down
31 changes: 23 additions & 8 deletions swift-nio-filesystem.patch
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,28 @@ diff --git a/Sources/NIOFileSystem/Internal/System Calls/Syscalls.swift b/Source
index 1e9c1661..2a4935e7 100644
--- a/Sources/NIOFileSystem/Internal/System Calls/Syscalls.swift
+++ b/Sources/NIOFileSystem/Internal/System Calls/Syscalls.swift
@@ -454,12 +454,21 @@ internal func libc_confstr(
@@ -452,12 +452,21 @@ internal func libc_confstr(
#endif

/// fts(3)
#if os(Android)
+#if compiler(>=6.1)
+#if compiler(<6.1)
+internal func libc_fts_open(
+ _ path: [UnsafeMutablePointer<CInterop.PlatformChar>?],
+ _ path: [UnsafeMutablePointer<CInterop.PlatformChar>],
+ _ options: CInt
+) -> UnsafeMutablePointer<CInterop.FTS> {
+ fts_open(path, options, nil)!
+}
+#else
internal func libc_fts_open(
_ path: [UnsafeMutablePointer<CInterop.PlatformChar>],
_ path: [UnsafeMutablePointer<CInterop.PlatformChar>?],
_ options: CInt
) -> UnsafeMutablePointer<CInterop.FTS> {
fts_open(path, options, nil)!
}
+#endif
#else
internal func libc_fts_open(
_ path: [UnsafeMutablePointer<CInterop.PlatformChar>?],

/// fts(3)
internal func libc_fts_read(
diff --git a/Sources/NIOFileSystem/Internal/SystemFileHandle.swift b/Sources/NIOFileSystem/Internal/SystemFileHandle.swift
index 3dc51872..49aeeeca 100644
--- a/Sources/NIOFileSystem/Internal/SystemFileHandle.swift
Expand Down Expand Up @@ -247,3 +247,18 @@ index f24736a7..310d9691 100644
let info = try await handle.info()
let size = info.size

diff --git a/Tests/NIOFileSystemTests/Internal/SyscallTests.swift b/Tests/NIOFileSystemTests/Internal/SyscallTests.swift
index 66ed1171..5253a650 100644
--- a/Tests/NIOFileSystemTests/Internal/SyscallTests.swift
+++ b/Tests/NIOFileSystemTests/Internal/SyscallTests.swift
@@ -17,6 +17,10 @@
import XCTest
@_spi(Testing) import _NIOFileSystem

+#if canImport(Android)
+import Android
+#endif
+
#if ENABLE_MOCKING
final class SyscallTests: XCTestCase {
func test_openat() throws {
130 changes: 0 additions & 130 deletions swift-nio-ndk27.patch

This file was deleted.

0 comments on commit 5a033bf

Please sign in to comment.