bpo-46315: Use fopencookie only on Emscripten 3.x and newer (GH-32266)

This commit is contained in:
Christian Heimes 2022-04-03 00:11:38 +03:00 committed by GitHub
parent c93a0ac697
commit 3df0e63aab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2072,7 +2072,7 @@ _PyTokenizer_Get(struct tok_state *tok,
return result;
}
#if defined(__wasi__) || defined(__EMSCRIPTEN__)
#if defined(__wasi__) || (defined(__EMSCRIPTEN__) && (__EMSCRIPTEN_major__ >= 3))
// fdopen() with borrowed fd. WASI does not provide dup() and Emscripten's
// dup() emulation with open() is slow.
typedef union {