Skip to content

Commit e13cf78

Browse files
committed
Merging changes to support Mac OSX 10.6.6 and Darwin GCC 4.2.x
2 parents 897de7b + 864e76d commit e13cf78

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()) return true;
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) return false;
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy