Skip to content

Commit aefb3a4

Browse files
committed
Workaround Linux compiler issue
1 parent 96eb669 commit aefb3a4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Sources/OpenGraph/Graph/Graph.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
// Status: WIP
77

88
public import OpenGraph_SPI
9-
import Foundation
109

1110
extension Graph {
1211
public static func typeIndex(
@@ -73,8 +72,13 @@ extension Graph {
7372
public static func setOutputValue<Value>(_ value: UnsafePointer<Value>)
7473
}
7574
75+
#if canImport(Darwin)
76+
import Foundation
77+
#endif
78+
7679
extension Graph {
7780
public func archiveJSON(name: String?) {
81+
#if canImport(Darwin)
7882
let options: NSDictionary = [
7983
Graph.descriptionFormat: "graph/dict",
8084
Graph.descriptionIncludeValues: true,
@@ -94,5 +98,6 @@ extension Graph {
9498
print("Wrote graph data to \"\(path)\".")
9599
} catch {
96100
}
101+
#endif
97102
}
98103
}

0 commit comments

Comments
 (0)