mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
more compatibility with other platforms (#1110)
Motivation: Everything should compile on as many platforms as possible. Modifications: Guard FileManager.temporaryDirectory behind `#available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, macCatalyst 13, *)` instead of just macOS 10.12. Result: Tests should build on iOS and friends too.
This commit is contained in:
1 parent
04831e62c5
commit
415b48e216
1 file changed
+1
-1
@@ -106,7 +106,7 @@ var temporaryDirectory: String {
|
||||
#elseif os(Linux)
|
||||
return "/tmp"
|
||||
#else
|
||||
if #available(OSX 10.12, *) {
|
||||
if #available(macOS 10.12, iOS 10, tvOS 10, watchOS 3, *) {
|
||||
return FileManager.default.temporaryDirectory.path
|
||||
} else {
|
||||
return "/tmp"
|
||||
|
||||
Reference in new issue
Block a user