We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 44ee4ed + a5d3c21 commit 64a89bfCopy full SHA for 64a89bf
Sources/Foundation/NSPathUtilities.swift
@@ -10,6 +10,15 @@
10
@_implementationOnly import CoreFoundation
11
#if os(Windows)
12
import WinSDK
13
+#elseif os(WASI)
14
+import WASILibc
15
+// CoreFoundation brings <errno.h> but it conflicts with WASILibc.errno
16
+// definition, so we need to explicitly select the one from WASILibc.
17
+// This is defined as "internal" since this workaround also used in other files.
18
+internal var errno: Int32 {
19
+ get { WASILibc.errno }
20
+ set { WASILibc.errno = newValue }
21
+}
22
#endif
23
24
0 commit comments