]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46315: Use fopencookie only on Emscripten 3.x and newer (GH-32266)
authorChristian Heimes <christian@python.org>
Sat, 2 Apr 2022 21:11:38 +0000 (00:11 +0300)
committerGitHub <noreply@github.com>
Sat, 2 Apr 2022 21:11:38 +0000 (23:11 +0200)
Parser/tokenizer.c

index 13116d052ea593c32e73b5ce0d58394ff057a557..db84e2e92e1677887882e7a5a0ddab126b11a248 100644 (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 {