From 33141ddeedeab84a30e18f300cd62ebef044f3ac Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 16 Dec 2019 07:57:52 -0800 Subject: [PATCH] [PATCH] Update bindings for the wasm32-wasi target This commit performs a number of updates for libc with the `wasm32-wasi` target: * Updates the `wasi-libc` repository commit used (previously known as `wasi-sysroot`) * Updates the container to Ubuntu 19.10 which has Clang 9 packaged which is all we need. * Avoids building `wasmtime` and instead downloads a precompiled binary. * Updates bindings in `src/wasi.rs` to match the current upstream state. Gbp-Pq: Name u-wasm32-libc-1625.patch --- vendor/libc/src/wasi.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/vendor/libc/src/wasi.rs b/vendor/libc/src/wasi.rs index 2e0914dcad..081141e44d 100644 --- a/vendor/libc/src/wasi.rs +++ b/vendor/libc/src/wasi.rs @@ -174,9 +174,9 @@ pub const EXIT_FAILURE: c_int = 1; pub const STDIN_FILENO: c_int = 0; pub const STDOUT_FILENO: c_int = 1; pub const STDERR_FILENO: c_int = 2; -pub const SEEK_SET: c_int = 2; -pub const SEEK_CUR: c_int = 0; -pub const SEEK_END: c_int = 1; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; pub const _IOFBF: c_int = 0; pub const _IONBF: c_int = 2; pub const _IOLBF: c_int = 1; @@ -207,8 +207,8 @@ pub const AT_EACCESS: c_int = 0x0; pub const AT_SYMLINK_NOFOLLOW: c_int = 0x1; pub const AT_SYMLINK_FOLLOW: c_int = 0x2; pub const AT_REMOVEDIR: c_int = 0x4; -pub const UTIME_OMIT: c_long = 1073741822; -pub const UTIME_NOW: c_long = 1073741823; +pub const UTIME_OMIT: c_long = 0xfffffffe; +pub const UTIME_NOW: c_long = 0xffffffff; pub const E2BIG: c_int = 1; pub const EACCES: c_int = 2; @@ -728,11 +728,8 @@ extern "C" { pub fn __wasilibc_fd_renumber(fd: c_int, newfd: c_int) -> c_int; pub fn __wasilibc_unlinkat(fd: c_int, path: *const c_char) -> c_int; pub fn __wasilibc_rmdirat(fd: c_int, path: *const c_char) -> c_int; - pub fn __wasilibc_init_preopen(); pub fn __wasilibc_find_relpath( path: *const c_char, - rights_base: __wasi_rights_t, - rights_inheriting: __wasi_rights_t, relative_path: *mut *const c_char, ) -> c_int; pub fn __wasilibc_tell(fd: c_int) -> ::off_t; -- 2.30.2