From f0ca345f6eb6a5c151390e0b309804b3707f4285 Mon Sep 17 00:00:00 2001 From: zane <39070793+zaneenders@users.noreply.github.com> Date: Mon, 30 Sep 2024 20:18:31 -0600 Subject: [PATCH] Add Musl support for static cross compilation. Motivation: Being able to use NIO SSH in projects that want to cross compile to Linux. Modifications: Add import for Musl if available. Result: Cross compiling to both x86_64 and aarch64 works. --- .../NIOSSH/Keys And Signatures/NIOSSHCertifiedPublicKey.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/NIOSSH/Keys And Signatures/NIOSSHCertifiedPublicKey.swift b/Sources/NIOSSH/Keys And Signatures/NIOSSHCertifiedPublicKey.swift index 09f6c69..cc6bae4 100644 --- a/Sources/NIOSSH/Keys And Signatures/NIOSSHCertifiedPublicKey.swift +++ b/Sources/NIOSSH/Keys And Signatures/NIOSSHCertifiedPublicKey.swift @@ -21,6 +21,8 @@ import Darwin import Glibc #elseif canImport(Bionic) import Bionic +#elseif canImport(Musl) +import Musl #endif /// A ``NIOSSHCertifiedPublicKey`` is an SSH public key combined with an SSH certificate.