Commit 2d44bf36 authored by Martin Sustrik's avatar Martin Sustrik

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

parent 8c25bab3
......@@ -249,10 +249,10 @@ void zmq::fd_signaler_t::signal (int signal_)
uint64_t zmq::fd_signaler_t::poll ()
{
// Set the reader to blocking mode.
int flags = fcntl (fd, F_GETFL, 0);
int flags = fcntl (r, F_GETFL, 0);
if (flags == -1)
flags = 0;
int rc = fcntl (fd, F_SETFL, flags & ~O_NONBLOCK);
int rc = fcntl (r, F_SETFL, flags & ~O_NONBLOCK);
errno_assert (rc != -1);
// Poll for events.
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment