diff --git a/api/wasm/cpp/proxy_wasm_api.h b/api/wasm/cpp/proxy_wasm_api.h index a179701f2acc..dc48e8f33551 100644 --- a/api/wasm/cpp/proxy_wasm_api.h +++ b/api/wasm/cpp/proxy_wasm_api.h @@ -530,7 +530,7 @@ inline WasmResult getPluginDirection(PluginDirection *direction_ptr) { } // Generic selector -inline absl::optional getSelectorExpression(std::initializer_list parts) { +inline Optional getSelectorExpression(std::initializer_list parts) { size_t size = 0; for (auto part: parts) { size += part.size() + 1; // null terminated string value diff --git a/api/wasm/cpp/proxy_wasm_intrinsics.h b/api/wasm/cpp/proxy_wasm_intrinsics.h index 72eba23cce01..9717757cc640 100644 --- a/api/wasm/cpp/proxy_wasm_intrinsics.h +++ b/api/wasm/cpp/proxy_wasm_intrinsics.h @@ -12,6 +12,8 @@ #include #include using StringView = std::string_view; +#include +template using Optional = std::optional; #include "proxy_wasm_enums.h" #include "proxy_wasm_result.h" diff --git a/source/extensions/common/wasm/null/null_plugin.h b/source/extensions/common/wasm/null/null_plugin.h index d1dc63e9978a..f7581aa1e8e6 100644 --- a/source/extensions/common/wasm/null/null_plugin.h +++ b/source/extensions/common/wasm/null/null_plugin.h @@ -19,6 +19,7 @@ using FilterDataStatus = Http::FilterDataStatus; using GrpcStatus = Envoy::Grpc::Status::GrpcStatus; using MetricType = Envoy::Extensions::Common::Wasm::Context::MetricType; using StringView = absl::string_view; +template using Optional = absl::optional; } // namespace Plugin } // namespace Null } // namespace Wasm