mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 22:25:40 +00:00
Added emscripten ___syscall64 and import ___syscall122
This commit is contained in:
parent
5907bcc0f4
commit
9f511f3994
@ -195,6 +195,16 @@ pub fn generate_emscripten_env<'a, 'b>() -> ImportObject<&'a str, &'b str> {
|
|||||||
"___syscall20",
|
"___syscall20",
|
||||||
ImportValue::Func(syscalls::___syscall20 as *const u8),
|
ImportValue::Func(syscalls::___syscall20 as *const u8),
|
||||||
);
|
);
|
||||||
|
import_object.set(
|
||||||
|
"env",
|
||||||
|
"___syscall64",
|
||||||
|
ImportValue::Func(syscalls::___syscall64 as *const u8),
|
||||||
|
);
|
||||||
|
import_object.set(
|
||||||
|
"env",
|
||||||
|
"___syscall122",
|
||||||
|
ImportValue::Func(syscalls::___syscall122 as *const u8),
|
||||||
|
);
|
||||||
// Process
|
// Process
|
||||||
import_object.set(
|
import_object.set(
|
||||||
"env",
|
"env",
|
||||||
@ -341,7 +351,7 @@ pub fn generate_emscripten_env<'a, 'b>() -> ImportObject<&'a str, &'b str> {
|
|||||||
mock_external!(import_object, ___syscall85);
|
mock_external!(import_object, ___syscall85);
|
||||||
mock_external!(import_object, ___syscall75);
|
mock_external!(import_object, ___syscall75);
|
||||||
mock_external!(import_object, ___syscall66);
|
mock_external!(import_object, ___syscall66);
|
||||||
mock_external!(import_object, ___syscall64);
|
// mock_external!(import_object, ___syscall64);
|
||||||
mock_external!(import_object, ___syscall63);
|
mock_external!(import_object, ___syscall63);
|
||||||
mock_external!(import_object, ___syscall60);
|
mock_external!(import_object, ___syscall60);
|
||||||
mock_external!(import_object, ___syscall54);
|
mock_external!(import_object, ___syscall54);
|
||||||
@ -370,7 +380,7 @@ pub fn generate_emscripten_env<'a, 'b>() -> ImportObject<&'a str, &'b str> {
|
|||||||
// mock_external!(import_object, ___syscall145);
|
// mock_external!(import_object, ___syscall145);
|
||||||
mock_external!(import_object, ___syscall142);
|
mock_external!(import_object, ___syscall142);
|
||||||
mock_external!(import_object, ___syscall140);
|
mock_external!(import_object, ___syscall140);
|
||||||
mock_external!(import_object, ___syscall122);
|
// mock_external!(import_object, ___syscall122);
|
||||||
mock_external!(import_object, ___syscall102);
|
mock_external!(import_object, ___syscall102);
|
||||||
// mock_external!(import_object, ___syscall20);
|
// mock_external!(import_object, ___syscall20);
|
||||||
mock_external!(import_object, ___syscall15);
|
mock_external!(import_object, ___syscall15);
|
||||||
|
@ -11,7 +11,7 @@ use libc::{
|
|||||||
getsockname, getpeername,
|
getsockname, getpeername,
|
||||||
sendto, recvfrom, setsockopt,
|
sendto, recvfrom, setsockopt,
|
||||||
getsockopt, sendmsg, recvmsg,
|
getsockopt, sendmsg, recvmsg,
|
||||||
msghdr, getpid, pid_t
|
msghdr, getpid, getppid, pid_t
|
||||||
};
|
};
|
||||||
|
|
||||||
use macros;
|
use macros;
|
||||||
@ -252,3 +252,11 @@ pub extern "C" fn ___syscall20() -> pid_t {
|
|||||||
getpid()
|
getpid()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// sys_getppid
|
||||||
|
pub extern "C" fn ___syscall64() -> pid_t {
|
||||||
|
debug!("emscripten::___syscall64");
|
||||||
|
unsafe {
|
||||||
|
getpid()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user