fix build on OS X

This commit is contained in:
Daniel Larimer 2014-05-23 21:54:59 -04:00
parent f636a9602c
commit 9f6b52eac2

View file

@ -1,6 +1,8 @@
#include <fc/network/rate_limiting.hpp> #include <fc/network/rate_limiting.hpp>
#include <fc/network/tcp_socket_io_hooks.hpp> #include <fc/network/tcp_socket_io_hooks.hpp>
#include <fc/network/tcp_socket.hpp> #include <fc/network/tcp_socket.hpp>
#include <list>
#include <algorithm>
#include <fc/network/ip.hpp> #include <fc/network/ip.hpp>
#include <fc/fwd_impl.hpp> #include <fc/fwd_impl.hpp>
#include <fc/asio.hpp> #include <fc/asio.hpp>
@ -262,7 +264,7 @@ namespace fc
while (!operations_sorted_by_length.empty()) while (!operations_sorted_by_length.empty())
{ {
uint32_t bytes_permitted_for_this_operation = bytes_remaining_to_allocate / operations_sorted_by_length.size(); uint32_t bytes_permitted_for_this_operation = bytes_remaining_to_allocate / operations_sorted_by_length.size();
uint32_t bytes_allocated_for_this_operation = std::min(operations_sorted_by_length.back()->length, bytes_permitted_for_this_operation); uint32_t bytes_allocated_for_this_operation = std::min<size_t>(operations_sorted_by_length.back()->length, bytes_permitted_for_this_operation);
operations_sorted_by_length.back()->permitted_length = bytes_allocated_for_this_operation; operations_sorted_by_length.back()->permitted_length = bytes_allocated_for_this_operation;
bytes_remaining_to_allocate -= bytes_allocated_for_this_operation; bytes_remaining_to_allocate -= bytes_allocated_for_this_operation;
operations_sorted_by_length.pop_back(); operations_sorted_by_length.pop_back();