Skip to content

Commit 6363cdf

Browse files
authored
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`: SwiftXcode/swift-lambda#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?
1 parent b2f8f35 commit 6363cdf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/NIOSSL/SSLCertificate.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ import CNIOBoringSSL
2020
import CNIOBoringSSLShims
2121
#endif
2222
import NIO
23+
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
24+
import struct Darwin.time_t
25+
#elseif canImport(Glibc)
26+
import struct Glibc.time_t
27+
#endif
2328

2429
/// A reference to a BoringSSL Certificate object (`X509 *`).
2530
///

0 commit comments

Comments
 (0)