VSTR_AUTOCONF_uintmax_t mmoff = fs->off; VSTR_AUTOCONF_uintmax_t mmlen = fs->len;
uintmax_t mmoff = fs->off; uintmax_t mmlen = fs->len;
static void httpd_serv_call_mmap(struct Con *con, struct Httpd_req_data *req,                                 struct File_sect *fs){  static long pagesz = 0;  Vstr_base *data = con->evnt->io_r;  VSTR_AUTOCONF_uintmax_t mmoff = fs->off;  VSTR_AUTOCONF_uintmax_t mmlen = fs->len;    ASSERT(!req->f_mmap || !req->f_mmap->len);  ASSERT(!con->use_mmap);  ASSERT(!req->head_op);  if (con->use_sendfile)    return;  if (con->fs_num > 1)    return;    if (!pagesz)    pagesz = sysconf(_SC_PAGESIZE);  if (pagesz == -1)    httpd__disable_mmap();  if (!req->policy->use_mmap ||      (mmlen < HTTP_CONF_MMAP_LIMIT_MIN) || (mmlen > HTTP_CONF_MMAP_LIMIT_MAX))    return;    /* mmap offset needs to be aligned - so tweak offset before and after */  mmoff /= pagesz;  mmoff *= pagesz;  ASSERT(mmoff <= fs->off);  mmlen += fs->off - mmoff;  if (!req->f_mmap && !(req->f_mmap = vstr_make_base(data->conf)))    VLG_WARN_RET_VOID((vlg, /* fall back to read */                       "failed to allocate mmap Vstr.\n"));  ASSERT(!req->f_mmap->len);    if (!vstr_sc_mmap_fd(req->f_mmap, 0, fs->fd, mmoff, mmlen, NULL))  {    if (errno == ENOSYS) /* also logs it */      httpd__disable_mmap();    VLG_WARN_RET_VOID((vlg, /* fall back to read */                       "mmap($<http-esc.vstr:%p%zu%zu>,"                       "(%ju,%ju)->(%ju,%ju)): %m\n",                       req->fname, (size_t)1, req->fname->len,                       fs->off, fs->len, mmoff, mmlen));  }    con->use_mmap = TRUE;    vstr_del(req->f_mmap, 1, fs->off - mmoff); /* remove alignment */      ASSERT(req->f_mmap->len == fs->len);}