Skip to content

Commit

Permalink
Don't use s_addr as parameter name. Fixes compiling with Solaris.
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Sirainen <tss@iki.fi>
  • Loading branch information
sirainen authored and keithw committed Aug 11, 2012
1 parent 0c5307f commit 6201522
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/network/network.cc
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ Connection::Connection( const char *desired_ip, const char *desired_port ) /* se
throw NetworkException( "Could not bind", errno ); throw NetworkException( "Could not bind", errno );
} }


bool Connection::try_bind( int socket, uint32_t s_addr, int port ) bool Connection::try_bind( int socket, uint32_t addr, int port )
{ {
struct sockaddr_in local_addr; struct sockaddr_in local_addr;
local_addr.sin_family = AF_INET; local_addr.sin_family = AF_INET;
local_addr.sin_addr.s_addr = s_addr; local_addr.sin_addr.s_addr = addr;


int search_low = PORT_RANGE_LOW, search_high = PORT_RANGE_HIGH; int search_low = PORT_RANGE_LOW, search_high = PORT_RANGE_HIGH;


Expand Down
2 changes: 1 addition & 1 deletion src/network/network.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace Network {
static const int PORT_RANGE_LOW = 60001; static const int PORT_RANGE_LOW = 60001;
static const int PORT_RANGE_HIGH = 60999; static const int PORT_RANGE_HIGH = 60999;


static bool try_bind( int socket, uint32_t s_addr, int port ); static bool try_bind( int socket, uint32_t addr, int port );


int sock; int sock;
bool has_remote_addr; bool has_remote_addr;
Expand Down

0 comments on commit 6201522

Please sign in to comment.