diff --git a/AUTHORS b/AUTHORS index bdb17a1e..7f378ff8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -60,6 +60,7 @@ Adrian von Bidder Aleksey Yeschenko Alessio Spadaro Alexander Majorov +Anh Vu Bernd Schumacher Brett Cameron Brian Granger diff --git a/configure.in b/configure.in index 9afeb50a..97166557 100644 --- a/configure.in +++ b/configure.in @@ -176,6 +176,7 @@ case "${host_os}" in ;; *aix*) AC_DEFINE(ZMQ_HAVE_AIX, 1, [Have AIX OS]) + AC_CHECK_LIB(crypto,RAND_bytes) ;; *hpux*) # Define on HP-UX to enable all library features diff --git a/src/zmq.cpp b/src/zmq.cpp index c073f82d..62e50cd6 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" @@ -30,7 +44,6 @@ #include "streamer.hpp" #include "socket_base.hpp" #include "msg_content.hpp" -#include "platform.hpp" #include "stdint.hpp" #include "config.hpp" #include "clock.hpp" @@ -38,14 +51,6 @@ #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 #endif