Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite13cf78

Browse files
committed
Merging changes to support Mac OSX 10.6.6 and Darwin GCC 4.2.x
2 parents897de7b +864e76d commite13cf78

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎libs/network/example/http/fileserver.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ struct file_cache {
4747
boost::upgrade_lock<boost::shared_mutex>lock(cache_mutex);
4848
std::string real_filename = doc_root_+path;
4949
if (regions.find(real_filename) != regions.end())returntrue;
50+
#ifdef O_NOATIME
5051
int fd =open(real_filename.c_str(), O_RDONLY|O_NOATIME|O_NONBLOCK);
52+
#else
53+
int fd =open(real_filename.c_str(), O_RDONLY|O_NONBLOCK);
54+
#endif
5155
if (fd == -1)returnfalse;
5256
std::size_t size =lseek(fd,0, SEEK_END);
5357
void * region =mmap(0, size, PROT_READ, MAP_PRIVATE, fd,0);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp