Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android support #244

Merged
merged 3 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -108,6 +108,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
Loading