diff --git a/Sources/NIOExtras/DebugInboundEventsHandler.swift b/Sources/NIOExtras/DebugInboundEventsHandler.swift index 14ad1e4..1ebdb9a 100644 --- a/Sources/NIOExtras/DebugInboundEventsHandler.swift +++ b/Sources/NIOExtras/DebugInboundEventsHandler.swift @@ -17,6 +17,8 @@ import NIOCore import Darwin #elseif canImport(Musl) import Musl +#elseif canImport(Android) +import Android #else import Glibc #endif diff --git a/Sources/NIOExtras/DebugOutboundEventsHandler.swift b/Sources/NIOExtras/DebugOutboundEventsHandler.swift index 13e9828..86506f7 100644 --- a/Sources/NIOExtras/DebugOutboundEventsHandler.swift +++ b/Sources/NIOExtras/DebugOutboundEventsHandler.swift @@ -18,6 +18,8 @@ import NIOCore import Darwin #elseif canImport(Musl) import Musl +#elseif canImport(Android) +import Android #else import Glibc #endif diff --git a/Sources/NIOExtras/WritePCAPHandler.swift b/Sources/NIOExtras/WritePCAPHandler.swift index 2e3f11a..914309b 100644 --- a/Sources/NIOExtras/WritePCAPHandler.swift +++ b/Sources/NIOExtras/WritePCAPHandler.swift @@ -20,6 +20,8 @@ import NIOCore import Darwin #elseif canImport(Musl) import Musl +#elseif canImport(Android) +import Android #else import Glibc #endif diff --git a/Sources/NIOSOCKS/Messages/SOCKSRequest.swift b/Sources/NIOSOCKS/Messages/SOCKSRequest.swift index 8fc9b45..c507e85 100644 --- a/Sources/NIOSOCKS/Messages/SOCKSRequest.swift +++ b/Sources/NIOSOCKS/Messages/SOCKSRequest.swift @@ -19,6 +19,8 @@ import NIOCore import Darwin #elseif canImport(Musl) import Musl +#elseif canImport(Android) +import Android #else import Glibc #endif diff --git a/Tests/NIOExtrasTests/SynchronizedFileSinkTests.swift b/Tests/NIOExtrasTests/SynchronizedFileSinkTests.swift index 3e920cf..f059036 100644 --- a/Tests/NIOExtrasTests/SynchronizedFileSinkTests.swift +++ b/Tests/NIOExtrasTests/SynchronizedFileSinkTests.swift @@ -108,6 +108,8 @@ private func withTemporaryFile( 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 diff --git a/Tests/NIOExtrasTests/WritePCAPHandlerTest.swift b/Tests/NIOExtrasTests/WritePCAPHandlerTest.swift index 1d44a10..1489d5b 100644 --- a/Tests/NIOExtrasTests/WritePCAPHandlerTest.swift +++ b/Tests/NIOExtrasTests/WritePCAPHandlerTest.swift @@ -19,6 +19,10 @@ import XCTest @testable import NIOExtras +#if canImport(Android) +import Android +#endif + class WritePCAPHandlerTest: XCTestCase { private var accumulatedPackets: [ByteBuffer]! private var channel: EmbeddedChannel!