mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-05 21:18:32 +08:00
C89 compatibility for http-restful-server
This commit is contained in:
parent
09275ae4ca
commit
a74fb940aa
@ -82,7 +82,9 @@ static void fn(struct mg_connection *c, int ev, void *ev_data) {
|
||||
mg_http_reply(c, 200, "", "{\"result\": \"%.*s\"}\n", hm->uri.len,
|
||||
hm->uri.buf);
|
||||
} else {
|
||||
struct mg_http_serve_opts opts = {.root_dir = s_root_dir};
|
||||
struct mg_http_serve_opts opts;
|
||||
memset(&opts, 0, sizeof(opts));
|
||||
opts.root_dir = s_root_dir;
|
||||
mg_http_serve_dir(c, ev_data, &opts);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user