From ebf3e96eb4fede42e034df32fd90b8fc58cf5e20 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Wed, 25 Aug 2021 07:39:02 +0000 Subject: [PATCH] Bug 1726474 - Update rlbox_wasm2c_sandbox and wasm2c_sandbox_compiler for mingw builds. r=shravanrn Differential Revision: https://phabricator.services.mozilla.com/D123541 --- config/external/rlbox_wasm2c_sandbox/moz.yaml | 4 ++-- config/external/wasm2c_sandbox_compiler/moz.yaml | 4 ++-- .../rlbox_wasm2c_sandbox/include/rlbox_wasm2c_sandbox.hpp | 2 +- third_party/wasm2c/wasm2c/wasm-rt-os-win.c | 4 ++-- third_party/wasm2c/wasm2c/wasm-rt-runner.c | 2 +- third_party/wasm2c/wasm2c/wasm-rt-wasi.c | 6 ------ 6 files changed, 8 insertions(+), 14 deletions(-) diff --git a/config/external/rlbox_wasm2c_sandbox/moz.yaml b/config/external/rlbox_wasm2c_sandbox/moz.yaml index 9073dfcbe33a..63c357e8975b 100644 --- a/config/external/rlbox_wasm2c_sandbox/moz.yaml +++ b/config/external/rlbox_wasm2c_sandbox/moz.yaml @@ -9,8 +9,8 @@ origin: description: rlbox integration for the wasm2c sandboxed code url: https://github.com/PLSysSec/rlbox_wasm2c_sandbox - release: commit 89df704002aba0fe79ca5b5fb26cda7dbecb5742 (2021-08-18T22:33:54Z). - revision: 89df704002aba0fe79ca5b5fb26cda7dbecb5742 + release: commit a7b7233cf1845bc2548ffc7ea06f27e8a024b851 (2021-08-24T08:37:28Z). + revision: a7b7233cf1845bc2548ffc7ea06f27e8a024b851 license: MIT license-file: LICENSE diff --git a/config/external/wasm2c_sandbox_compiler/moz.yaml b/config/external/wasm2c_sandbox_compiler/moz.yaml index 48b8dd5ae1f0..d827cd46504f 100644 --- a/config/external/wasm2c_sandbox_compiler/moz.yaml +++ b/config/external/wasm2c_sandbox_compiler/moz.yaml @@ -9,8 +9,8 @@ origin: description: wasm2c fork used for rlbox sandboxing url: https://github.com/PLSysSec/wasm2c_sandbox_compiler - release: commit b785706fd885ffb4255639c31249ba7040b3b83f (2021-08-18T21:38:59Z). - revision: b785706fd885ffb4255639c31249ba7040b3b83f + release: commit 8e81237c485f9282a4c176be50bd3c1f8a3ed7d7 (2021-08-24T09:37:16Z). + revision: 8e81237c485f9282a4c176be50bd3c1f8a3ed7d7 license: Apache-2.0 license-file: LICENSE diff --git a/third_party/rlbox_wasm2c_sandbox/include/rlbox_wasm2c_sandbox.hpp b/third_party/rlbox_wasm2c_sandbox/include/rlbox_wasm2c_sandbox.hpp index 62ff14ffccb6..64d43ff38fb7 100755 --- a/third_party/rlbox_wasm2c_sandbox/include/rlbox_wasm2c_sandbox.hpp +++ b/third_party/rlbox_wasm2c_sandbox/include/rlbox_wasm2c_sandbox.hpp @@ -22,7 +22,7 @@ #ifndef NOMINMAX #define NOMINMAX #endif -#include +#include #else #include #endif diff --git a/third_party/wasm2c/wasm2c/wasm-rt-os-win.c b/third_party/wasm2c/wasm2c/wasm-rt-os-win.c index d8d8a6085f41..53d847b4976f 100644 --- a/third_party/wasm2c/wasm2c/wasm-rt-os-win.c +++ b/third_party/wasm2c/wasm2c/wasm-rt-os-win.c @@ -11,7 +11,7 @@ #include #include -#include +#include #ifdef VERBOSE_LOGGING #define VERBOSE_LOG(...) { printf(__VA_ARGS__); } @@ -282,4 +282,4 @@ int os_clock_getres(void* clock_data, int clock_id, struct timespec* out_struct) #else // https://stackoverflow.com/questions/26541150/warning-iso-c-forbids-an-empty-translation-unit typedef int make_iso_compilers_happy; -#endif \ No newline at end of file +#endif diff --git a/third_party/wasm2c/wasm2c/wasm-rt-runner.c b/third_party/wasm2c/wasm2c/wasm-rt-runner.c index 7b9be99d8f5d..d1d37e5270e0 100644 --- a/third_party/wasm2c/wasm2c/wasm-rt-runner.c +++ b/third_party/wasm2c/wasm2c/wasm-rt-runner.c @@ -13,7 +13,7 @@ #ifndef NOMINMAX #define NOMINMAX #endif - #include + #include #define LINETERM "\r\n" #else #include diff --git a/third_party/wasm2c/wasm2c/wasm-rt-wasi.c b/third_party/wasm2c/wasm2c/wasm-rt-wasi.c index b47dbfb3e7ef..4926749d0ce8 100644 --- a/third_party/wasm2c/wasm2c/wasm-rt-wasi.c +++ b/third_party/wasm2c/wasm2c/wasm-rt-wasi.c @@ -48,12 +48,6 @@ typedef double f64; #ifdef _MSC_VER #include typedef SSIZE_T ssize_t; -#else // _MSC_VER -#ifdef _WIN64 -typedef signed long long ssize_t; -#else // _WIN64 -typedef signed long ssize_t; -#endif // _WIN64 #endif // _MSC_VER #endif // _WIN32