From 7690febe77a91a5cef1a5152ffffe5c7a852599a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Legan=C3=A9s-Combarro=20=27piranna?= Date: Sun, 19 May 2019 19:37:57 +0200 Subject: [PATCH] `getnameinfo()` --- lib/emscripten/src/emscripten_target.rs | 14 ++++++++++++++ lib/emscripten/src/lib.rs | 1 + 2 files changed, 15 insertions(+) diff --git a/lib/emscripten/src/emscripten_target.rs b/lib/emscripten/src/emscripten_target.rs index 17c0d2aa2..44820ad63 100644 --- a/lib/emscripten/src/emscripten_target.rs +++ b/lib/emscripten/src/emscripten_target.rs @@ -228,6 +228,20 @@ pub fn _getloadavg(_ctx: &mut Ctx, _loadavg: i32, _nelem: i32) -> i32 { debug!("emscripten::getloadavg"); 0 } +pub fn _getnameinfo( + _ctx: &mut Ctx, + _addr: i32, + _addrlen: i32, + _host: i32, + _hostlen: i32, + _serv: i32, + _servlen: i32, + _flags: i32 +) -> i32 { + debug!("emscripten::_getnameinfo({}, {}, {}, {}, {}, {}, {})", + _addr, _addrlen, _host, _hostlen, _serv, _servlen, _flags); + 0 +} // Invoke functions // They save the stack to allow unwinding diff --git a/lib/emscripten/src/lib.rs b/lib/emscripten/src/lib.rs index dbdd78d17..828b3eb6e 100644 --- a/lib/emscripten/src/lib.rs +++ b/lib/emscripten/src/lib.rs @@ -780,6 +780,7 @@ pub fn generate_emscripten_env(globals: &mut EmscriptenGlobals) -> ImportObject "_gethostbyaddr" => func!(crate::emscripten_target::_gethostbyaddr), "_gethostbyname_r" => func!(crate::emscripten_target::_gethostbyname_r), "_getloadavg" => func!(crate::emscripten_target::_getloadavg), + "_getnameinfo" => func!(crate::emscripten_target::_getnameinfo), "invoke_dii" => func!(crate::emscripten_target::invoke_dii), "invoke_diiii" => func!(crate::emscripten_target::invoke_diiii), "invoke_iiiii" => func!(crate::emscripten_target::invoke_iiiii),