Skip to content

Commit

Permalink
Explicit time_t import (#294)
Browse files Browse the repository at this point in the history
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?
  • Loading branch information
helje5 authored May 11, 2021
1 parent b2f8f35 commit 6363cdf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/NIOSSL/SSLCertificate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 *`).
///
Expand Down

0 comments on commit 6363cdf

Please sign in to comment.