Skip to content

Commit 0734450

Browse files
committed
Fixup compilation failures for some compilers
1 parent d7611ca commit 0734450

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Sources/System/Internals/Exports.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ internal func setTLS(_ key: _PlatformTLSKey, _ p: UnsafeMutableRawPointer?) {
160160
}
161161
internal func getTLS(_ key: _PlatformTLSKey) -> UnsafeMutableRawPointer? {
162162
#if os(Windows)
163-
FlsGetValue(key)
163+
return FlsGetValue(key)
164164
#else
165-
pthread_getspecific(key)
165+
return pthread_getspecific(key)
166166
#endif
167167
}

Sources/System/Internals/Mocking.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,16 @@ internal func _mockOffT(
191191
// Force paths to be treated as Windows syntactically if `enabled` is
192192
// true.
193193
internal func _withWindowsPaths(enabled: Bool, _ body: () -> ()) {
194-
guard enabled else { return body() }
194+
#if ENABLE_MOCKING
195+
guard enabled else {
196+
body()
197+
return
198+
}
195199
MockingDriver.withMockingEnabled { driver in
196200
driver.forceWindowsSyntaxForPaths = true
197201
body()
198202
}
203+
#else
204+
body()
205+
#endif
199206
}

0 commit comments

Comments
 (0)