diff --git a/Userland/Libraries/LibWasm/WASI/Wasi.cpp b/Userland/Libraries/LibWasm/WASI/Wasi.cpp index d5aed595a47..cb3d7baec1c 100644 --- a/Userland/Libraries/LibWasm/WASI/Wasi.cpp +++ b/Userland/Libraries/LibWasm/WASI/Wasi.cpp @@ -909,7 +909,20 @@ ErrorOr Implementation::function_by_name(StringView name) namespace ABI { template -auto CompatibleValueType = IsOneOf +struct HostTypeImpl { + using Type = T; +}; + +template +struct HostTypeImpl { + using Type = UnderlyingType; +}; + +template +using HostType = typename HostTypeImpl::Type; + +template +auto CompatibleValueType = IsOneOf, i8, i16, i32, u8, u16> ? Wasm::ValueType(Wasm::ValueType::I32) : Wasm::ValueType(Wasm::ValueType::I64);