Commit 3144f7de authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

asio-sv2: Fix compile error with OS X

Use struct stat.st_mtime instead of st_mtim which seems to be Linux
specific.
parent c84a190a
......@@ -93,8 +93,7 @@ int main(int argc, char *argv[]) {
if (stat(path.c_str(), &stbuf) == 0) {
headers.push_back(
header{"content-length", std::to_string(stbuf.st_size)});
headers.push_back(
header{"last-modified", http_date(stbuf.st_mtim.tv_sec)});
headers.push_back(header{"last-modified", http_date(stbuf.st_mtime)});
}
res->write_head(200, std::move(headers));
res->end(file_reader_from_fd(fd));
......
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