File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
_TestingInternals/include Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ extension Test.Attachment {
246
246
file = try FileHandle ( atPath: preferredPath, mode: " wxb " )
247
247
result = preferredPath
248
248
break
249
- } catch let error as CError where error. rawValue == EEXIST {
249
+ } catch let error as CError where error. rawValue == swt_EEXIST ( ) {
250
250
// Try again with a new suffix.
251
251
continue
252
252
} catch where usingPreferredName {
Original file line number Diff line number Diff line change @@ -154,6 +154,14 @@ static int swt_siginfo_t_si_status(const siginfo_t *siginfo) {
154
154
#endif
155
155
#endif
156
156
157
+ /// Get the value of `EEXIST`.
158
+ ///
159
+ /// This function is provided because `EEXIST` is a complex macro in wasi-libc
160
+ /// and cannot be imported directly into Swift.
161
+ static int swt_EEXIST (void ) {
162
+ return EEXIST ;
163
+ }
164
+
157
165
SWT_ASSUME_NONNULL_END
158
166
159
167
#endif
You can’t perform that action at this time.
0 commit comments