Skip to content

Commit

Permalink
Couple of patches for AIX build
Browse files Browse the repository at this point in the history
- 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 <sustrik@250bpm.com>
  • Loading branch information
sustrik committed Nov 13, 2010
1 parent f7123de commit ffcb0ba
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Adrian von Bidder <avbidder@fortytwo.ch>
Aleksey Yeschenko <aleksey@yeschenko.com> Aleksey Yeschenko <aleksey@yeschenko.com>
Alessio Spadaro <alessio.spadaro@finservice.com> Alessio Spadaro <alessio.spadaro@finservice.com>
Alexander Majorov <alexander.majorov@intel.com> Alexander Majorov <alexander.majorov@intel.com>
Anh Vu <vietanh.vu@m4x.org>
Bernd Schumacher <bernd.schumacher@hp.com> Bernd Schumacher <bernd.schumacher@hp.com>
Brett Cameron <Brett.Cameron@hp.com> Brett Cameron <Brett.Cameron@hp.com>
Brian Granger <ellisonbg.net@gmail.com> Brian Granger <ellisonbg.net@gmail.com>
Expand Down
1 change: 1 addition & 0 deletions configure.in
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ case "${host_os}" in
;; ;;
*aix*) *aix*)
AC_DEFINE(ZMQ_HAVE_AIX, 1, [Have AIX OS]) AC_DEFINE(ZMQ_HAVE_AIX, 1, [Have AIX OS])
AC_CHECK_LIB(crypto,RAND_bytes)
;; ;;
*hpux*) *hpux*)
# Define on HP-UX to enable all library features # Define on HP-UX to enable all library features
Expand Down
23 changes: 14 additions & 9 deletions src/zmq.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. 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.h"
#include "../include/zmq_utils.h" #include "../include/zmq_utils.h"


Expand All @@ -31,21 +45,12 @@
#include "socket_base.hpp" #include "socket_base.hpp"
#include "app_thread.hpp" #include "app_thread.hpp"
#include "msg_content.hpp" #include "msg_content.hpp"
#include "platform.hpp"
#include "stdint.hpp" #include "stdint.hpp"
#include "config.hpp" #include "config.hpp"
#include "ctx.hpp" #include "ctx.hpp"
#include "err.hpp" #include "err.hpp"
#include "fd.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 #if !defined ZMQ_HAVE_WINDOWS
#include <unistd.h> #include <unistd.h>
#include <sys/time.h> #include <sys/time.h>
Expand Down

0 comments on commit ffcb0ba

Please sign in to comment.