From 64abc77edf1ef81e69bd90a2ac386de615c8e8ea Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Mon, 30 Sep 2024 18:17:01 +0100 Subject: [PATCH] Don't just import `locale_h`. (#775) On modularised platforms, #771 broke things because it changed from importing `Musl` or `Glibc` to importing just `locale_h`. The latter understandably doesn't define `errno` or `EOVERFLOW`, so we get a build failure. Fixes #773. --- Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift b/Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift index a46b4f759..9d9d6dfb7 100644 --- a/Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift +++ b/Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift @@ -17,13 +17,16 @@ import NIOHTTP1 import xlocale #elseif canImport(locale_h) import locale_h -#elseif canImport(Darwin) +#endif + +#if canImport(Darwin) import Darwin #elseif canImport(Musl) import Musl #elseif canImport(Glibc) import Glibc #endif + import CAsyncHTTPClient import NIOCore