Commit 5c9ab406 authored by Sergey Lyubka's avatar Sergey Lyubka

Using MAP_PRIVATE for mmap, to fix mac build for Lua

parent 451d0771
...@@ -3969,7 +3969,7 @@ static void handle_lsp_request(struct mg_connection *conn, const char *path, ...@@ -3969,7 +3969,7 @@ static void handle_lsp_request(struct mg_connection *conn, const char *path,
if ((fp = fopen(path, "r")) == NULL) { if ((fp = fopen(path, "r")) == NULL) {
send_http_error(conn, 404, "Not Found", "%s", "File not found"); send_http_error(conn, 404, "Not Found", "%s", "File not found");
} else if ((p = mmap(NULL, st->size, PROT_READ, 0, } else if ((p = mmap(NULL, st->size, PROT_READ, MAP_PRIVATE,
fileno(fp), 0)) == MAP_FAILED) { fileno(fp), 0)) == MAP_FAILED) {
send_http_error(conn, 500, http_500_error, "%s", "x"); send_http_error(conn, 500, http_500_error, "%s", "x");
} else if ((L = luaL_newstate()) == NULL) { } else if ((L = luaL_newstate()) == NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment