More fixes based on CentOS 6.2 results

This commit is contained in:
Mikko Koppanen 2012-02-18 23:07:27 +00:00
parent d00d4843be
commit 33a18f0f90

View File

@ -125,7 +125,7 @@ int zmq::tcp_listener_t::get_address (std::string &addr_)
struct sockaddr_storage ss;
char host [NI_MAXHOST];
char serv_info [NI_MAXSERV];
int port, rc;
int rc;
std::stringstream address;
// Get the details of the TCP socket
@ -135,7 +135,7 @@ int zmq::tcp_listener_t::get_address (std::string &addr_)
return rc;
}
rc = getnameinfo ((struct sockaddr *) &ss, ss.ss_len, host, NI_MAXHOST, serv_info, NI_MAXSERV, NI_NUMERICHOST);
rc = getnameinfo ((struct sockaddr *) &ss, sizeof (ss), host, NI_MAXHOST, serv_info, NI_MAXSERV, NI_NUMERICHOST);
if (rc != 0) {
return rc;
}