From ffcb0baa735538b8b4a0f00799d1185adba2761f Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 13 Nov 2010 18:08:18 +0100 Subject: Couple of patches for AIX build - RAND_bytes function resides in crypto library - pollfd on AIX used 'reqevents' instead of events and 'retnevents' instead of 'revents' Signed-off-by: Martin Sustrik --- src/zmq.cpp | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/zmq.cpp b/src/zmq.cpp index 5770e04..a3db720 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -17,6 +17,20 @@ along with this program. If not, see . */ +#include "platform.hpp" + +// On AIX, poll.h has to be included before zmq.h to get consistent +// definition of pollfd structure (AIX uses 'reqevents' and 'retnevents' +// instead of 'events' and 'revents' and defines macros to map from POSIX-y +// names to AIX-specific names). +#if defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ + defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\ + defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\ + defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\ + defined ZMQ_HAVE_NETBSD +#include +#endif + #include "../include/zmq.h" #include "../include/zmq_utils.h" @@ -31,21 +45,12 @@ #include "socket_base.hpp" #include "app_thread.hpp" #include "msg_content.hpp" -#include "platform.hpp" #include "stdint.hpp" #include "config.hpp" #include "ctx.hpp" #include "err.hpp" #include "fd.hpp" -#if defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ - defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\ - defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\ - defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\ - defined ZMQ_HAVE_NETBSD -#include -#endif - #if !defined ZMQ_HAVE_WINDOWS #include #include -- cgit v1.2.3