Skip to content

Commit a8ba0c1

Browse files
committed
Fix WASI
1 parent fbef473 commit a8ba0c1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Python/fileutils.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3079,7 +3079,7 @@ _Py_IsValidFD(int fd)
30793079
#if defined(F_GETFD) && ( \
30803080
defined(__linux__) || \
30813081
defined(__APPLE__) || \
3082-
defined(__wasm__))
3082+
(defined(__wasm__) && !defined(__wasi__)))
30833083
return fcntl(fd, F_GETFD) >= 0;
30843084
#elif defined(__linux__)
30853085
int fd2 = dup(fd);
@@ -3099,4 +3099,3 @@ _Py_IsValidFD(int fd)
30993099
return (fstat(fd, &st) == 0);
31003100
#endif
31013101
}
3102-

0 commit comments

Comments
 (0)