Fix some compile warnings and update document (#670)

And implement clock_gettime wrapper for libc-built.
This commit is contained in:
Wenyong Huang
2021-07-22 19:39:53 +08:00
committed by GitHub
parent 04e7afe55d
commit 28f104036c
5 changed files with 35 additions and 11 deletions

View File

@ -1674,7 +1674,7 @@ wasm_set_wasi_root_dir(const char *root_dir)
if (!(path = realpath(root_dir, resolved_path)))
return false;
strncpy(wasi_root_dir, path, sizeof(wasi_root_dir));
snprintf(wasi_root_dir, sizeof(wasi_root_dir), "%s", path);
return true;
}