mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-19 20:01:20 +00:00
Move emscripten ___syscall221 to the unix implementation
This commit is contained in:
@ -1076,6 +1076,24 @@ pub fn ___syscall220(ctx: &mut Ctx, _which: i32, mut varargs: VarArgs) -> i32 {
|
||||
pos as i32
|
||||
}
|
||||
|
||||
// fcntl64
|
||||
pub fn ___syscall221(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_int {
|
||||
debug!("emscripten::___syscall221 (fcntl64) {}", _which);
|
||||
let fd: i32 = varargs.get(ctx);
|
||||
let cmd: i32 = varargs.get(ctx);
|
||||
let arg: i32 = varargs.get(ctx);
|
||||
// (FAPPEND - 0x08
|
||||
// |FASYNC - 0x40
|
||||
// |FFSYNC - 0x80
|
||||
// |FNONBLOCK - 0x04
|
||||
let ret = unsafe { fcntl(fd, cmd, arg) };
|
||||
debug!("=> fd: {}, cmd: {} = {}", fd, cmd, ret);
|
||||
if ret == -1 {
|
||||
debug!("=> last os error: {}", Error::last_os_error(),);
|
||||
}
|
||||
ret
|
||||
}
|
||||
|
||||
/// fallocate
|
||||
pub fn ___syscall324(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_int {
|
||||
debug!("emscripten::___syscall324 (fallocate) {}", _which);
|
||||
|
Reference in New Issue
Block a user