diff options
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | src/zmq.cpp | 23 |
3 files changed, 16 insertions, 9 deletions
@@ -48,6 +48,7 @@ Adrian von Bidder <avbidder@fortytwo.ch> Aleksey Yeschenko <aleksey@yeschenko.com> Alessio Spadaro <alessio.spadaro@finservice.com> Alexander Majorov <alexander.majorov@intel.com> +Anh Vu <vietanh.vu@m4x.org> Bernd Schumacher <bernd.schumacher@hp.com> Brett Cameron <Brett.Cameron@hp.com> Brian Granger <ellisonbg.net@gmail.com> diff --git a/configure.in b/configure.in index 8e8df73..4932995 100644 --- a/configure.in +++ b/configure.in @@ -170,6 +170,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 5770e04..a3db720 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -17,6 +17,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#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 <poll.h> +#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 <poll.h> -#endif - #if !defined ZMQ_HAVE_WINDOWS #include <unistd.h> #include <sys/time.h> |