Skip to content

Commit 3c180eb

Browse files
authored
build: repair the Windows build after #3040, #3058 (#3066)
* build: repair the Windows build after #3040, #3058 Repair the Windows builds after the breakage introduced by #3040 and 3058. * build: repair Windows build after #3063
1 parent fa7a6cd commit 3c180eb

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Sources/Basics/HTTPClient.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ import TSCUtility
2020
import Glibc
2121
#endif
2222

23+
#if os(Windows)
24+
import CRT
25+
#endif
26+
2327
// MARK: - HTTPClient
2428

2529
public struct HTTPClient {

Sources/PackageCollections/Providers/GitHubPackageMetadataProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct GitHubPackageMetadataProvider: PackageMetadataProvider {
2828
self.httpClient = httpClient ?? .init()
2929
self.defaultHttpClient = httpClient == nil
3030
self.decoder = JSONDecoder()
31-
#if os(Linux)
31+
#if os(Linux) || os(Windows)
3232
self.decoder.dateDecodingStrategy = .iso8601
3333
#else
3434
if #available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {

Sources/PackageCollections/Providers/JSONPackageCollectionProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct JSONPackageCollectionProvider: PackageCollectionProvider {
2727
self.httpClient = httpClient ?? .init()
2828
self.defaultHttpClient = httpClient == nil
2929
self.decoder = JSONDecoder()
30-
#if os(Linux)
30+
#if os(Linux) || os(Windows)
3131
self.decoder.dateDecodingStrategy = .iso8601
3232
#else
3333
if #available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *) {

0 commit comments

Comments
 (0)