From f123bf31542ef541608505478d6d0d2aae80822f Mon Sep 17 00:00:00 2001 From: cpq Date: Fri, 17 Apr 2026 22:13:40 +0100 Subject: [PATCH] Fix C++ build --- mongoose.h | 3 ++- src/dash.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mongoose.h b/mongoose.h index a2137b6a..3a5b85cc 100644 --- a/mongoose.h +++ b/mongoose.h @@ -3342,7 +3342,8 @@ static inline void mg_dash_ev_handler(struct mg_connection *c, int ev, if (mg_match(hm->uri, mg_str("/api/websocket"), NULL)) { mg_ws_upgrade(c, hm, NULL); } else { - struct mg_http_serve_opts opts = {0}; + struct mg_http_serve_opts opts; + memset(&opts, 0, sizeof(opts)); opts.fs = &mg_fs_packed; mg_mem_files = mg_packed_files; mg_http_serve_file(c, hm, "/dashboard.html", &opts); diff --git a/src/dash.h b/src/dash.h index 8f6a0add..50858331 100644 --- a/src/dash.h +++ b/src/dash.h @@ -204,7 +204,8 @@ static inline void mg_dash_ev_handler(struct mg_connection *c, int ev, if (mg_match(hm->uri, mg_str("/api/websocket"), NULL)) { mg_ws_upgrade(c, hm, NULL); } else { - struct mg_http_serve_opts opts = {0}; + struct mg_http_serve_opts opts; + memset(&opts, 0, sizeof(opts)); opts.fs = &mg_fs_packed; mg_mem_files = mg_packed_files; mg_http_serve_file(c, hm, "/dashboard.html", &opts);