--- /dev/null
+diff -ur zeromq-3.2.2.orig/src/err.hpp zeromq-3.2.2/src/err.hpp
+--- zeromq-3.2.2.orig/src/err.hpp 2012-10-25 02:30:40.000000000 -0600
++++ zeromq-3.2.2/src/err.hpp 2013-01-21 10:56:25.095010874 -0700
+@@ -152,4 +152,10 @@
+
+ #endif
+
++// Conditionally check for EPROTO; some platforms (OpenBSD) don't support it.
++#ifdef EPROTO
++#define OR_ERRNO_EQ_EPROTO || errno == EPROTO
++#else
++#define OR_ERRNO_EQ_EPROTO
++#endif
+
+diff -ur zeromq-3.2.2.orig/src/ipc_listener.cpp zeromq-3.2.2/src/ipc_listener.cpp
+--- zeromq-3.2.2.orig/src/ipc_listener.cpp 2012-11-23 00:54:28.000000000 -0700
++++ zeromq-3.2.2/src/ipc_listener.cpp 2013-01-21 10:57:02.670355121 -0700
+@@ -196,7 +196,7 @@
+ fd_t sock = ::accept (s, NULL, NULL);
+ if (sock == -1) {
+ errno_assert (errno == EAGAIN || errno == EWOULDBLOCK ||
+- errno == EINTR || errno == ECONNABORTED || errno == EPROTO ||
++ errno == EINTR || errno == ECONNABORTED OR_ERRNO_EQ_EPROTO ||
+ errno == ENFILE);
+ return retired_fd;
+ }
+diff -ur zeromq-3.2.2.orig/src/tcp_listener.cpp zeromq-3.2.2/src/tcp_listener.cpp
+--- zeromq-3.2.2.orig/src/tcp_listener.cpp 2012-11-23 00:54:28.000000000 -0700
++++ zeromq-3.2.2/src/tcp_listener.cpp 2013-01-21 10:56:48.884173113 -0700
+@@ -262,7 +262,7 @@
+ #else
+ if (sock == -1) {
+ errno_assert (errno == EAGAIN || errno == EWOULDBLOCK ||
+- errno == EINTR || errno == ECONNABORTED || errno == EPROTO ||
++ errno == EINTR || errno == ECONNABORTED OR_ERRNO_EQ_EPROTO ||
+ errno == ENOBUFS || errno == ENOMEM || errno == EMFILE ||
+ errno == ENFILE);
+ return retired_fd;
say "Patching...";
for my $patch (glob("$basedir/files/zeromq-$version-*.patch")) {
- run ["patch"], '<', $patch or die "Failed to patch ØMQ";
+ run [qw/patch -p1/], '<', $patch or die "Failed to patch ØMQ";
}
say "Configuring...";