diff --git a/build/build.pl b/build/build.pl index b91cf22..42b8fd8 100755 --- a/build/build.pl +++ b/build/build.pl @@ -97,6 +97,8 @@ my $needs_reconfig = !!$opts{reconfig}; my $patchf; if ( $libraryjs=~/\b\Q___setErrNo(ERRNO_CODES.\E(EAGAIN|ENOTSUP)\b/ ) { $patchf = 'emscripten_1.38.10_eagain.patch' } + elsif ( $libraryjs=~/no shell available\s+setErrNo\Q({{{ cDefine('EAGAIN') }}})\E/ ) + { $patchf = 'emscripten_1.39.16_eagain.patch' } elsif ( $libraryjs=~/\b\QcDefine('EAGAIN')\E/ ) # note that this appears in 1.38.1* versions too { $patchf = 'emscripten_1.38.28_eagain.patch' } else { die "Could not figure out which library.js patch to use" } diff --git a/build/emscripten_1.39.16_eagain.patch b/build/emscripten_1.39.16_eagain.patch new file mode 100644 index 0000000..66ebfd4 --- /dev/null +++ b/build/emscripten_1.39.16_eagain.patch @@ -0,0 +1,19 @@ +--- library.js.orig 2020-05-18 17:14:18.682328912 +0200 ++++ library.js 2020-05-18 17:14:48.366639562 +0200 +@@ -271,7 +271,7 @@ + // pid_t fork(void); + // http://pubs.opengroup.org/onlinepubs/000095399/functions/fork.html + // We don't support multiple processes. +- setErrNo({{{ cDefine('EAGAIN') }}}); ++ setErrNo({{{ cDefine('ENOTSUP') }}}); + return -1; + }, + vfork: 'fork', +@@ -696,7 +696,7 @@ + // http://pubs.opengroup.org/onlinepubs/000095399/functions/system.html + // Can't call external programs. + if (!command) return 0; // no shell available +- setErrNo({{{ cDefine('EAGAIN') }}}); ++ setErrNo({{{ cDefine('ENOTSUP') }}}); + return -1; + },