Added patch for Emscripten 1.39.16 (closes #16)

Thanks @reneeb!
master
Hauke D 6 years ago
parent d1206e84fb
commit 16bc09d89a

@ -97,6 +97,8 @@ my $needs_reconfig = !!$opts{reconfig};
my $patchf; my $patchf;
if ( $libraryjs=~/\b\Q___setErrNo(ERRNO_CODES.\E(EAGAIN|ENOTSUP)\b/ ) if ( $libraryjs=~/\b\Q___setErrNo(ERRNO_CODES.\E(EAGAIN|ENOTSUP)\b/ )
{ $patchf = 'emscripten_1.38.10_eagain.patch' } { $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 elsif ( $libraryjs=~/\b\QcDefine('EAGAIN')\E/ ) # note that this appears in 1.38.1* versions too
{ $patchf = 'emscripten_1.38.28_eagain.patch' } { $patchf = 'emscripten_1.38.28_eagain.patch' }
else { die "Could not figure out which library.js patch to use" } else { die "Could not figure out which library.js patch to use" }

@ -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;
},
Loading…
Cancel
Save