ZMQII-69: Make 0MQ build on HP-UX

This commit is contained in:
Martin Sustrik
2010-02-10 11:04:28 +01:00
parent 8c25bab31d
commit 2d44bf3644
2 changed files with 7 additions and 3 deletions

View File

@@ -268,7 +268,11 @@ zmq::fd_t zmq::tcp_connecter_t::connect ()
// Following code should handle both Berkeley-derived socket
// implementations and Solaris.
int err = 0;
socklen_t len = sizeof err;
#if defined ZMQ_HAVE_HPUX
int len = sizeof (err);
#else
socklen_t len = sizeof (err);
#endif
int rc = getsockopt (s, SOL_SOCKET, SO_ERROR, (char*) &err, &len);
if (rc == -1)
err = errno;