From 6363cdf6d2fb863e82434f3c4618f4e896e37569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Helge=20He=C3=9F?= Date: Tue, 11 May 2021 09:54:45 +0200 Subject: [PATCH] Explicit `time_t` import (#294) W/o this `time_t` is only available as an implicit import via `CNIOBoringSSL`, which is `@_implementionOnly`. The issue popped up in `swift-lambda`: https://github.com/SwiftXcode/swift-lambda/issues/6 I suspect it is due to slightly different import ordering (which makes the compiler pickup the alias). It probably is not specific to SPMDestinations, the import order is just undefined? --- Sources/NIOSSL/SSLCertificate.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/NIOSSL/SSLCertificate.swift b/Sources/NIOSSL/SSLCertificate.swift index 86aaaf48..801e47a7 100644 --- a/Sources/NIOSSL/SSLCertificate.swift +++ b/Sources/NIOSSL/SSLCertificate.swift @@ -20,6 +20,11 @@ import CNIOBoringSSL import CNIOBoringSSLShims #endif import NIO +#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) +import struct Darwin.time_t +#elseif canImport(Glibc) +import struct Glibc.time_t +#endif /// A reference to a BoringSSL Certificate object (`X509 *`). ///