Skip to content

Commit

Permalink
Android support
Browse files Browse the repository at this point in the history
  • Loading branch information
marcprux committed Jan 13, 2025
1 parent 066c8e4 commit a670838
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/NIOExtras/DebugInboundEventsHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import NIOCore
import Darwin
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#else
import Glibc
#endif
Expand Down
2 changes: 2 additions & 0 deletions Sources/NIOExtras/DebugOutboundEventsHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import NIOCore
import Darwin
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#else
import Glibc
#endif
Expand Down
2 changes: 2 additions & 0 deletions Sources/NIOExtras/WritePCAPHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import NIOCore
import Darwin
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#else
import Glibc
#endif
Expand Down
2 changes: 2 additions & 0 deletions Sources/NIOSOCKS/Messages/SOCKSRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import NIOCore
import Darwin
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#else
import Glibc
#endif
Expand Down
2 changes: 2 additions & 0 deletions Tests/NIOExtrasTests/SynchronizedFileSinkTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ private func withTemporaryFile<T>(
private var temporaryDirectory: String {
#if os(Linux)
return "/tmp"
#elseif os(Android)
return "/data/local/tmp"
#else
if #available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *) {
return FileManager.default.temporaryDirectory.path
Expand Down
3 changes: 3 additions & 0 deletions Tests/NIOExtrasTests/WritePCAPHandlerTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import Foundation
import NIOCore
import NIOEmbedded
import XCTest
#if canImport(Android)
import Android
#endif

@testable import NIOExtras

Expand Down

0 comments on commit a670838

Please sign in to comment.