From 989fd4f23b4b0812268b4604be5e8200fcb52a93 Mon Sep 17 00:00:00 2001 From: Finagolfin Date: Wed, 18 Dec 2024 15:46:32 +0530 Subject: [PATCH] Import Android instead for NIOEmbedded Pull #3030 invokes C APIs that aren't in the extremely limited Bionic module, so import the much larger Android overlay instead. --- Sources/NIOEmbedded/Embedded.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/NIOEmbedded/Embedded.swift b/Sources/NIOEmbedded/Embedded.swift index 865a97c88a8..fbbfb4d6729 100644 --- a/Sources/NIOEmbedded/Embedded.swift +++ b/Sources/NIOEmbedded/Embedded.swift @@ -28,8 +28,8 @@ import Darwin import Glibc #elseif canImport(Musl) import Musl -#elseif canImport(Bionic) -import Bionic +#elseif canImport(Android) +import Android #elseif canImport(WASILibc) import WASILibc #else @@ -130,7 +130,7 @@ public final class EmbeddedEventLoop: EventLoop, CustomStringConvertible { public let description = "EmbeddedEventLoop" - #if canImport(Darwin) || canImport(Glibc) || canImport(Musl) || canImport(Bionic) + #if canImport(Darwin) || canImport(Glibc) || canImport(Musl) || canImport(Android) private let myThread: pthread_t = pthread_self() func isCorrectThread() -> Bool {