summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-11-13 18:16:13 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-11-13 18:16:13 +0100
commitf77c8ca47ff77af44eab7b4b8538ed49ec428eda (patch)
treef1a5206f0abb60a6efeb4c8eb4342331723732c9 /src
parenta2500ae3485d6243778b832d22dc6dc02a00f025 (diff)
parentffcb0baa735538b8b4a0f00799d1185adba2761f (diff)
Merge branch 'maint'
* maint: Couple of patches for AIX build
Diffstat (limited to 'src')
-rw-r--r--src/zmq.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/zmq.cpp b/src/zmq.cpp
index c073f82..62e50cd 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"
@@ -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 <poll.h>
-#endif
-
#if !defined ZMQ_HAVE_WINDOWS
#include <unistd.h>
#endif