Skip to content

Commit 864e76d

Browse files
committed
Changes to compile with gcc 4.2.1 on OSX 10.6.6.
1 parent 3b28e1e commit 864e76d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

boost/network/protocol/http/server/async_connection.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ namespace boost { namespace network { namespace http {
514514
void continue_write(Range range, boost::function<void(boost::system::error_code)> callback) {
515515
thread_pool().post(
516516
boost::bind(
517-
&async_connection<Tag,Handler>::write_impl<Range>
517+
&async_connection<Tag,Handler>::template write_impl<Range>
518518
, async_connection<Tag,Handler>::shared_from_this()
519519
, range, callback));
520520
}
@@ -610,15 +610,15 @@ namespace boost { namespace network { namespace http {
610610
if (!headers_already_sent && !headers_in_progress) {
611611
write_headers_only(
612612
boost::bind(
613-
&async_connection<Tag,Handler>::continue_write<Range>
613+
&async_connection<Tag,Handler>::template continue_write<Range>
614614
, async_connection<Tag,Handler>::shared_from_this()
615615
, range, callback_function
616616
));
617617
return;
618618
} else if (headers_in_progress && !headers_already_sent) {
619619
pending_actions.push_back(
620620
boost::bind(
621-
&async_connection<Tag,Handler>::continue_write<Range>
621+
&async_connection<Tag,Handler>::template continue_write<Range>
622622
, async_connection<Tag,Handler>::shared_from_this()
623623
, range, callback_function));
624624
return;

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