diff --git a/mongoose.c b/mongoose.c index 01926fd5..6b387925 100644 --- a/mongoose.c +++ b/mongoose.c @@ -1470,7 +1470,8 @@ static int getrange(struct mg_str *s, int64_t *a, int64_t *b) { } void mg_http_serve_file(struct mg_connection *c, struct mg_http_message *hm, - const char *path, struct mg_http_serve_opts *opts) { + const char *path, + const struct mg_http_serve_opts *opts) { char etag[64]; struct mg_fs *fs = opts->fs == NULL ? &mg_fs_posix : opts->fs; struct mg_fd *fd = mg_fs_open(fs, path, MG_FS_READ); @@ -1534,7 +1535,7 @@ void mg_http_serve_file(struct mg_connection *c, struct mg_http_message *hm, struct printdirentrydata { struct mg_connection *c; struct mg_http_message *hm; - struct mg_http_serve_opts *opts; + const struct mg_http_serve_opts *opts; const char *dir; }; @@ -1570,7 +1571,7 @@ static void printdirentry(const char *name, void *userdata) { } static void listdir(struct mg_connection *c, struct mg_http_message *hm, - struct mg_http_serve_opts *opts, char *dir) { + const struct mg_http_serve_opts *opts, char *dir) { static const char *sort_js_code = "