File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,11 @@ func _convertDarwinBooleanToBool(_ x: DarwinBoolean) -> Bool {
84
84
85
85
#endif
86
86
87
+ // wasi-libc defines `errno` in a way ClangImporter can understand, so we don't
88
+ // need to define shims for it. On the contrary, if we define the shim, we will
89
+ // get an ambiguity error when importing WASILibc module and SwiftWASILibc Clang
90
+ // module (or a Clang module that re-exports SwiftWASILibc).
91
+ #if !os(WASI)
87
92
//===----------------------------------------------------------------------===//
88
93
// sys/errno.h
89
94
//===----------------------------------------------------------------------===//
@@ -96,6 +101,7 @@ public var errno : Int32 {
96
101
return _swift_stdlib_setErrno ( val)
97
102
}
98
103
}
104
+ #endif
99
105
100
106
101
107
//===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ posix_error_codes = [
73
73
"EADDRNOTAVAIL",
74
74
"EAFNOSUPPORT",
75
75
"EAGAIN",
76
+ "EWOULDBLOCK",
76
77
"EALREADY",
77
78
"EBADF",
78
79
"EBADMSG",
@@ -125,6 +126,7 @@ posix_error_codes = [
125
126
"ENOTRECOVERABLE",
126
127
"ENOTSOCK",
127
128
"ENOTSUP",
129
+ "EOPNOTSUPP",
128
130
"ENOTTY",
129
131
"ENXIO",
130
132
"EOVERFLOW",
You can’t perform that action at this time.
0 commit comments