Skip to content

Commit

Permalink
Don't just import locale_h.
Browse files Browse the repository at this point in the history
On modularised platforms, swift-server#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 swift-server#773.
  • Loading branch information
al45tair committed Sep 30, 2024
1 parent 38608db commit ed34c20
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Sources/AsyncHTTPClient/HTTPClient+HTTPCookie.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ed34c20

Please sign in to comment.