From 1beb5468101620baef7cd2f2db74f9be69b2db57 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Fri, 23 Jun 2023 11:29:15 +0100 Subject: [PATCH] Add support for Musl libc (#103) Since Musl is sufficiently different from Glibc (see https://wiki.musl-libc.org/functional-differences-from-glibc.html), it requires a different import, which now should be applied to files that have `import Glibc` in them. --- Sources/X509/Verifier/RFC5280/URIConstraints.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/X509/Verifier/RFC5280/URIConstraints.swift b/Sources/X509/Verifier/RFC5280/URIConstraints.swift index d92565a..0841163 100644 --- a/Sources/X509/Verifier/RFC5280/URIConstraints.swift +++ b/Sources/X509/Verifier/RFC5280/URIConstraints.swift @@ -15,9 +15,12 @@ import Foundation #if os(Windows) import WinSDK -#elseif os(Linux) || os(Android) +#elseif canImport(Glibc) import Glibc import CoreFoundation +#elseif canImport(Musl) +import Musl +import CoreFoundation #elseif canImport(Darwin) import Darwin #endif