summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZhidao HONG <z.hong@f5.com>2021-05-05 16:30:26 +0800
committerZhidao HONG <z.hong@f5.com>2021-05-05 16:30:26 +0800
commit8bea2977bc292a9631512734ff6c46b62b24cf26 (patch)
tree23d08f600b1dc76a425a643ff57f4b12a27752aa
parent53279af5d44dce2b679399d6a36eb46292928175 (diff)
downloadunit-8bea2977bc292a9631512734ff6c46b62b24cf26.tar.gz
unit-8bea2977bc292a9631512734ff6c46b62b24cf26.tar.bz2
Fixed building without openat2().
-rw-r--r--src/nxt_http_static.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nxt_http_static.c b/src/nxt_http_static.c
index 98d70739..fe3e19cc 100644
--- a/src/nxt_http_static.c
+++ b/src/nxt_http_static.c
@@ -39,7 +39,7 @@ nxt_http_static_handler(nxt_task_t *task, nxt_http_request_t *r,
nxt_str_t index, extension, *mtype, *chroot;
nxt_uint_t level;
nxt_bool_t need_body;
- nxt_file_t *f, af, file;
+ nxt_file_t *f, file;
nxt_file_info_t fi;
nxt_http_field_t *field;
nxt_http_status_t status;
@@ -124,6 +124,8 @@ nxt_http_static_handler(nxt_task_t *task, nxt_http_request_t *r,
}
if (nxt_fast_path(ret == NXT_OK)) {
+ nxt_file_t af;
+
af = file;
nxt_memzero(&file, sizeof(nxt_file_t));
file.name = fname;