File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Sources/FirebaseFirestore Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,7 @@ let SwiftFirebase =
219219 cxxSettings: [
220220 . define( " INTERNAL_EXPERIMENTAL " ) ,
221221 . define( " _CRT_SECURE_NO_WARNINGS " , . when( platforms: [ . windows] ) ) ,
222+ . headerSearchPath( " ../../third_party/firebase-development/usr/include " ) ,
222223 ] ,
223224 swiftSettings: [
224225 . interoperabilityMode( . Cxx) ,
Original file line number Diff line number Diff line change @@ -50,7 +50,17 @@ extension Timestamp: Codable {
5050extension Date {
5151 internal func firestoreTimestamp( ) -> Timestamp {
5252 var secondsDouble : Double = 0.0
53- var fraction = modf ( timeIntervalSince1970, & secondsDouble)
53+ #if canImport(Darwin.C)
54+ var fraction = Darwin . C. modf ( timeIntervalSince1970, & secondsDouble)
55+ #elseif canImport(SwiftGlibc)
56+ var fraction = SwiftGlibc . modf ( timeIntervalSince1970, & secondsDouble)
57+ #elseif canImport(ucrt)
58+ var fraction = ucrt. modf ( timeIntervalSince1970, & secondsDouble)
59+ #elseif canImport(SwiftAndroid)
60+ var fraction = SwiftAndroid . modf ( timeIntervalSince1970, & secondsDouble)
61+ #else
62+ #error("Unsupported platform")
63+ #endif
5464
5565 // Re-implementation of https://github.com/firebase/firebase-ios-sdk/blob/master/Firestore/Source/API/FIRTimestamp.m#L50
5666 if ( fraction < 0 ) {
You can’t perform that action at this time.
0 commit comments