summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-10-29 23:40:17 +0100
committerGitHub <noreply@github.com>2018-10-29 23:40:17 +0100
commit7771fe5d4a0051b5bbff62fe3de989cc05591ba6 (patch)
treefc8dfb591088cd1a03c6faf0790a0f26c562747f /drivers
parent187507d4ba3565b1d20db107505cffc1c63c604e (diff)
parent5c2c47a17449a69c24ab92804dbb7ca09fd920c9 (diff)
Merge pull request #23388 from eska014/html5-stubexec
Add proper stubs for OS_JavaScript::execute(), get_process_id(), kill()
Diffstat (limited to 'drivers')
-rw-r--r--drivers/unix/os_unix.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 7ff27be501..279274734f 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -288,6 +288,11 @@ uint64_t OS_Unix::get_ticks_usec() const {
Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bool p_blocking, ProcessID *r_child_id, String *r_pipe, int *r_exitcode, bool read_stderr) {
+#ifdef __EMSCRIPTEN__
+ // Don't compile this code at all to avoid undefined references.
+ // Actual virtual call goes to OS_JavaScript.
+ ERR_FAIL_V(ERR_BUG);
+#else
if (p_blocking && r_pipe) {
String argss;
@@ -354,6 +359,7 @@ Error OS_Unix::execute(const String &p_path, const List<String> &p_arguments, bo
}
return OK;
+#endif
}
Error OS_Unix::kill(const ProcessID &p_pid) {