Skip to content

Commit

Permalink
Merge pull request #333 from michaelbrundage/master
Browse files Browse the repository at this point in the history
Fix C++11 compile errors on Mac OS X 10.9 and LLVM 5.1.
  • Loading branch information
JohnLangford committed Jul 4, 2014
2 parents 79fb38a + d28ab8a commit 706f883
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cluster/spanning_tree.cc
Expand Up @@ -152,7 +152,7 @@ int main(int argc, char* argv[]) {
short unsigned int port = 26543;

address.sin_port = htons(port);
if (bind(sock,(sockaddr*)&address, sizeof(address)) < 0)
if (::bind(sock,(sockaddr*)&address, sizeof(address)) < 0)
report_error("bind: ");

if (argc == 2 && strcmp("--nondaemon",argv[1])==0)
Expand Down
2 changes: 1 addition & 1 deletion vowpalwabbit/allreduce.cc
Expand Up @@ -155,7 +155,7 @@ void all_reduce_init(const string master_location, const size_t unique_id, const
bool listening = false;
while(!listening)
{
if (bind(sock,(sockaddr*)&address, sizeof(address)) < 0)
if (::bind(sock,(sockaddr*)&address, sizeof(address)) < 0)
{
#ifdef _WIN32
if (WSAGetLastError() == WSAEADDRINUSE)
Expand Down
2 changes: 1 addition & 1 deletion vowpalwabbit/example.cc
Expand Up @@ -107,7 +107,7 @@ struct features_and_source
{
v_array<feature> feature_map; //map to store sparse feature vectors
uint32_t stride_shift;
size_t mask;
uint32_t mask;
weight* base;
};

Expand Down
2 changes: 1 addition & 1 deletion vowpalwabbit/nn.cc
Expand Up @@ -20,7 +20,7 @@ using namespace LEARNER;
namespace NN {
const float hidden_min_activation = -3;
const float hidden_max_activation = 3;
const int nn_constant = 533357803;
const uint32_t nn_constant = 533357803;

struct nn {
uint32_t k;
Expand Down

0 comments on commit 706f883

Please sign in to comment.