From: Christian Heimes Date: Sat, 2 Apr 2022 21:11:38 +0000 (+0300) Subject: bpo-46315: Use fopencookie only on Emscripten 3.x and newer (GH-32266) X-Git-Tag: v3.11.0a7~50 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3df0e63aabef905b72fad78256f24b9270c63172;p=thirdparty%2FPython%2Fcpython.git bpo-46315: Use fopencookie only on Emscripten 3.x and newer (GH-32266) --- diff --git a/Parser/tokenizer.c b/Parser/tokenizer.c index 13116d052ea5..db84e2e92e16 100644 --- a/Parser/tokenizer.c +++ b/Parser/tokenizer.c @@ -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 {