summaryrefslogtreecommitdiff
path: root/src/device.cpp
diff options
context:
space:
mode:
authorMartin Lucina <martin@lucina.net>2012-01-23 09:00:29 +0100
committerMartin Lucina <martin@lucina.net>2012-01-23 09:00:29 +0100
commitba0336b4d129a9e261c95276f89640b3459176bf (patch)
treea488f7efb61a6950a462815062c3b0f007f40ff5 /src/device.cpp
parentc3363afa881b46f3df8a6b72ed15cfbac18f4713 (diff)
parent4016b657973bba87caf75168ba70aaa85d556487 (diff)
Merge commit 'upstream/2.1.11'
Diffstat (limited to 'src/device.cpp')
-rw-r--r--src/device.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/device.cpp b/src/device.cpp
index 351283a..4d86e91 100644
--- a/src/device.cpp
+++ b/src/device.cpp
@@ -20,6 +20,20 @@
#include <stddef.h>
+#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 "device.hpp"