mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-21 23:19:31 +08:00
Merge pull request #360 from vortechs2000/fix_hpux
Fix build on HPUX 11iv3
This commit is contained in:
commit
4d4674e088
@ -103,7 +103,11 @@ void zmq::ipc_listener_t::in_event ()
|
|||||||
int zmq::ipc_listener_t::get_address (std::string &addr_)
|
int zmq::ipc_listener_t::get_address (std::string &addr_)
|
||||||
{
|
{
|
||||||
struct sockaddr_storage ss;
|
struct sockaddr_storage ss;
|
||||||
|
#ifdef ZMQ_HAVE_HPUX
|
||||||
|
int sl = sizeof (ss);
|
||||||
|
#else
|
||||||
socklen_t sl = sizeof (ss);
|
socklen_t sl = sizeof (ss);
|
||||||
|
#endif
|
||||||
int rc = getsockname (s, (sockaddr *) &ss, &sl);
|
int rc = getsockname (s, (sockaddr *) &ss, &sl);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
addr_.clear ();
|
addr_.clear ();
|
||||||
|
@ -133,7 +133,11 @@ int zmq::tcp_listener_t::get_address (std::string &addr_)
|
|||||||
{
|
{
|
||||||
// Get the details of the TCP socket
|
// Get the details of the TCP socket
|
||||||
struct sockaddr_storage ss;
|
struct sockaddr_storage ss;
|
||||||
|
#ifdef ZMQ_HAVE_HPUX
|
||||||
|
int sl = sizeof (ss);
|
||||||
|
#else
|
||||||
socklen_t sl = sizeof (ss);
|
socklen_t sl = sizeof (ss);
|
||||||
|
#endif
|
||||||
int rc = getsockname (s, (struct sockaddr *) &ss, &sl);
|
int rc = getsockname (s, (struct sockaddr *) &ss, &sl);
|
||||||
|
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
@ -233,7 +237,11 @@ zmq::fd_t zmq::tcp_listener_t::accept ()
|
|||||||
zmq_assert (s != retired_fd);
|
zmq_assert (s != retired_fd);
|
||||||
|
|
||||||
struct sockaddr_storage ss = {0};
|
struct sockaddr_storage ss = {0};
|
||||||
|
#ifdef ZMQ_HAVE_HPUX
|
||||||
|
int ss_len = sizeof (ss);
|
||||||
|
#else
|
||||||
socklen_t ss_len = sizeof (ss);
|
socklen_t ss_len = sizeof (ss);
|
||||||
|
#endif
|
||||||
fd_t sock = ::accept (s, (struct sockaddr *) &ss, &ss_len);
|
fd_t sock = ::accept (s, (struct sockaddr *) &ss, &ss_len);
|
||||||
|
|
||||||
#ifdef ZMQ_HAVE_WINDOWS
|
#ifdef ZMQ_HAVE_WINDOWS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user