Skip to content

Commit 16bc09d

Browse files
committed
Added patch for Emscripten 1.39.16 (closes #16)
Thanks @reneeb!
1 parent d1206e8 commit 16bc09d

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

build/build.pl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ =head1 Author, Copyright, and License
9797
my $patchf;
9898
if ( $libraryjs=~/\b\Q___setErrNo(ERRNO_CODES.\E(EAGAIN|ENOTSUP)\b/ )
9999
{ $patchf = 'emscripten_1.38.10_eagain.patch' }
100+
elsif ( $libraryjs=~/no shell available\s+setErrNo\Q({{{ cDefine('EAGAIN') }}})\E/ )
101+
{ $patchf = 'emscripten_1.39.16_eagain.patch' }
100102
elsif ( $libraryjs=~/\b\QcDefine('EAGAIN')\E/ ) # note that this appears in 1.38.1* versions too
101103
{ $patchf = 'emscripten_1.38.28_eagain.patch' }
102104
else { die "Could not figure out which library.js patch to use" }
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--- library.js.orig 2020-05-18 17:14:18.682328912 +0200
2+
+++ library.js 2020-05-18 17:14:48.366639562 +0200
3+
@@ -271,7 +271,7 @@
4+
// pid_t fork(void);
5+
// http://pubs.opengroup.org/onlinepubs/000095399/functions/fork.html
6+
// We don't support multiple processes.
7+
- setErrNo({{{ cDefine('EAGAIN') }}});
8+
+ setErrNo({{{ cDefine('ENOTSUP') }}});
9+
return -1;
10+
},
11+
vfork: 'fork',
12+
@@ -696,7 +696,7 @@
13+
// http://pubs.opengroup.org/onlinepubs/000095399/functions/system.html
14+
// Can't call external programs.
15+
if (!command) return 0; // no shell available
16+
- setErrNo({{{ cDefine('EAGAIN') }}});
17+
+ setErrNo({{{ cDefine('ENOTSUP') }}});
18+
return -1;
19+
},

0 commit comments

Comments
 (0)