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

+3-3
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

+4
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)